Skip to content

Commit 77b4705

Browse files
authored
Merge pull request #536 from paolobarbolini/yup-oauth2-v12
Upgrade yup-oauth2 to v12
2 parents 68c883e + 493435b commit 77b4705

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

google-apis-common/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ serde_json = "1"
2727
serde_with = "3"
2828
tokio = { version = "1", features = ["time"] }
2929
url = "2"
30-
yup-oauth2 = { version = "11", optional = true }
30+
yup-oauth2 = { version = "12", optional = true }

google-apis-common/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ impl Read for MultiPartReader<'_> {
423423
}
424424

425425
write!(encoded_headers, "{}: {}", k, v.to_str().unwrap())
426-
.map_err(|err| std::io::Error::other(err))?;
426+
.map_err(std::io::Error::other)?;
427427
}
428428

429429
let mut c = Cursor::new(Vec::<u8>::new());

google-clis-common/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ mime = "0.3"
2121
serde = "1"
2222
serde_json = "1"
2323
strsim = "0.11"
24-
yup-oauth2 = "11"
24+
yup-oauth2 = "12"

src/generator/templates/Cargo.toml.mako

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ tokio = { version = "1", features = ["full"] }
4747
% endif
4848
url = "2"
4949
utoipa = { version = "4", optional = true }
50-
yup-oauth2 = { version = "11", optional = true }
50+
yup-oauth2 = { version = "12", optional = true }
5151
5252
google-apis-common = { path = "../../google-apis-common", version = "7" }
5353
% if cargo.get('is_executable'):

src/generator/templates/cli/lib/engine.mako

+3-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ where
139139
let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
140140
secret,
141141
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
142-
hyper_util::client::legacy::Client::builder(executor).build(connector),
142+
yup_oauth2::client::CustomHyperClientBuilder::from(
143+
hyper_util::client::legacy::Client::builder(executor).build(connector),
144+
),
143145
).persist_tokens_to_disk(format!("{}/${util.program_name()}", config_dir)).build().await.unwrap();
144146
145147
<% gpm = gen_global_parameter_names(parameters) %>\

0 commit comments

Comments
 (0)