diff --git a/rust-toolchain.toml b/rust-toolchain.toml index d71e80ac..6a80f673 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -3,5 +3,5 @@ # https://github.com/oxidecomputer/dropshot/blob/main/rust-toolchain.toml [toolchain] -channel = "1.95.0" +channel = "1.97.1" components = ["clippy", "rustfmt"] diff --git a/v-api/src/endpoints/login/oauth/remote/google.rs b/v-api/src/endpoints/login/oauth/remote/google.rs index d1a131f8..932a8e50 100644 --- a/v-api/src/endpoints/login/oauth/remote/google.rs +++ b/v-api/src/endpoints/login/oauth/remote/google.rs @@ -62,15 +62,16 @@ impl GoogleOAuthProvider { revocation_endpoint: Some("https://oauth2.googleapis.com/revoke".to_string()), }, }); - let authz_code_pkce_flow_info = config - .proxy_web - .and_then(|proxy| authz_code_flow_info.as_ref().map(|web| (web, proxy))) - .map(|(web, proxy)| OAuthProviderAuthorizationCodePkceInfo { - client_id: proxy.client_id, - redirect_endpoint: proxy.redirect_uri, - proxy_port: proxy.proxy_port, - web: web.clone(), - }); + let authz_code_pkce_flow_info = + authz_code_flow_info + .as_ref() + .zip(config.proxy_web) + .map(|(web, proxy)| OAuthProviderAuthorizationCodePkceInfo { + client_id: proxy.client_id, + redirect_endpoint: proxy.redirect_uri, + proxy_port: proxy.proxy_port, + web: web.clone(), + }); let device_code_flow_info = config.device.map(|device| OAuthProviderDeviceInfo { client_id: device.client_id, auth_url_endpoint: format!("{}/login/oauth/google/device", public_url), diff --git a/v-api/src/endpoints/login/oauth/remote/zendesk.rs b/v-api/src/endpoints/login/oauth/remote/zendesk.rs index 283645cd..4706422e 100644 --- a/v-api/src/endpoints/login/oauth/remote/zendesk.rs +++ b/v-api/src/endpoints/login/oauth/remote/zendesk.rs @@ -60,15 +60,16 @@ impl ZendeskOAuthProvider { revocation_endpoint: None, }, }); - let authz_code_pkce_flow_info = config - .proxy_web - .and_then(|proxy| authz_code_flow_info.as_ref().map(|web| (web, proxy))) - .map(|(web, proxy)| OAuthProviderAuthorizationCodePkceInfo { - client_id: proxy.client_id, - redirect_endpoint: proxy.redirect_uri, - proxy_port: proxy.proxy_port, - web: web.clone(), - }); + let authz_code_pkce_flow_info = + authz_code_flow_info + .as_ref() + .zip(config.proxy_web) + .map(|(web, proxy)| OAuthProviderAuthorizationCodePkceInfo { + client_id: proxy.client_id, + redirect_endpoint: proxy.redirect_uri, + proxy_port: proxy.proxy_port, + web: web.clone(), + }); Self { authz_code_flow_info, diff --git a/v-model/tests/postgres.rs b/v-model/tests/postgres.rs index 5793859f..af27342d 100644 --- a/v-model/tests/postgres.rs +++ b/v-model/tests/postgres.rs @@ -108,7 +108,7 @@ impl TestDb { // Connect to the builtin postgres database since we know it exists. // This makes it easier to deal with postgres instances stood up as // part of a dev environment manager such as flox.dev - let url = format!("{}/postgres", &self.db_base); + let url = format!("{}/postgres", self.db_base); let conn: ConnectionManager = ConnectionManager::new(&url); conn.connect().unwrap() }