From edd572cc7b2e6746dbe6924dbf6e2dbfab4c960b Mon Sep 17 00:00:00 2001 From: Ivan Ukhov Date: Thu, 21 Mar 2024 15:55:00 +0100 Subject: [PATCH 1/2] Update yup-oauth2 to 8.3.3 and hyper-rustls to 0.25 --- google-clis-common/Cargo.toml | 2 +- src/generator/templates/Cargo.toml.mako | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-clis-common/Cargo.toml b/google-clis-common/Cargo.toml index 1ac51b2332..69214632c1 100644 --- a/google-clis-common/Cargo.toml +++ b/google-clis-common/Cargo.toml @@ -17,7 +17,7 @@ doctest = false [dependencies] mime = "^ 0.3" -yup-oauth2 = "^ 8.2" +yup-oauth2 = "8.3.3" serde = "1" serde_json = "1" strsim = "0.10.0" diff --git a/src/generator/templates/Cargo.toml.mako b/src/generator/templates/Cargo.toml.mako index e4eff88d11..d8e1bf0649 100644 --- a/src/generator/templates/Cargo.toml.mako +++ b/src/generator/templates/Cargo.toml.mako @@ -27,7 +27,7 @@ path = "src/main.rs" [dependencies] anyhow = "^ 1.0" -hyper-rustls = "0.24.0" +hyper-rustls = "0.25.0" ## Must match the one hyper uses, otherwise there are duplicate similarly named `Mime` structs mime = "^ 0.3.0" serde = { version = "^ 1.0", features = ["derive"] } From 1ee7a03816f61cc6b92ef7acbb83236177972694 Mon Sep 17 00:00:00 2001 From: Ivan Ukhov Date: Thu, 21 Mar 2024 16:03:37 +0100 Subject: [PATCH 2/2] Unwrap after with_native_roots --- src/generator/templates/api/lib/lib.mako | 2 +- src/generator/templates/cli/main.rs.mako | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generator/templates/api/lib/lib.mako b/src/generator/templates/api/lib/lib.mako index cb0ac09d50..267952930d 100644 --- a/src/generator/templates/api/lib/lib.mako +++ b/src/generator/templates/api/lib/lib.mako @@ -261,7 +261,7 @@ let auth = oauth2::InstalledFlowAuthenticator::builder( secret, oauth2::InstalledFlowReturnMethod::HTTPRedirect, ).build().await.unwrap(); -let mut hub = ${hub_type}::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);\ +let mut hub = ${hub_type}::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);\ ## You will still have to set the filter for your comment type - either nothing, or rust_doc_comment ! diff --git a/src/generator/templates/cli/main.rs.mako b/src/generator/templates/cli/main.rs.mako index 05f6a72788..ee5bf38b8c 100644 --- a/src/generator/templates/cli/main.rs.mako +++ b/src/generator/templates/cli/main.rs.mako @@ -36,6 +36,7 @@ async fn main() { let debug = matches.is_present("a${DEBUG_FLAG}"); let connector = hyper_rustls::HttpsConnectorBuilder::new().with_native_roots() + .unwrap() .https_or_http() .enable_http1() .build();