diff --git a/src/api/admin.rs b/src/api/admin.rs index 4b359eaf..807c224f 100644 --- a/src/api/admin.rs +++ b/src/api/admin.rs @@ -452,11 +452,7 @@ async fn oauth2_callback(params: OAuth2CallbackParams) -> Result, E ("client_secret", &client_secret), ]; - let response = match make_http_request(Method::POST, &token_url)? - .form(&form_params) - .send() - .await - { + let response = match make_http_request(Method::POST, &token_url)?.form(&form_params).send().await { Ok(res) => res, Err(e) => err!(format!("OAuth2 Token Exchange Error: {e}")), }; diff --git a/src/config.rs b/src/config.rs index bdf304c2..82db9c67 100644 --- a/src/config.rs +++ b/src/config.rs @@ -898,7 +898,7 @@ make_config! { /// SMTP OAuth2 Refresh Token |> OAuth2 Refresh Token for obtaining new access tokens smtp_oauth2_refresh_token: Pass, true, option; /// SMTP OAuth2 Scopes |> Comma-separated list of OAuth2 scopes - smtp_oauth2_scopes: String, true, def, "".to_string(); + smtp_oauth2_scopes: String, true, def, String::new(); /// SMTP connection timeout |> Number of seconds when to stop trying to connect to the SMTP server smtp_timeout: u64, true, def, 15; /// Server name sent during HELO |> By default this value should be the machine's hostname, but might need to be changed in case it trips some anti-spam filters diff --git a/src/mail.rs b/src/mail.rs index 1696923d..87a252eb 100644 --- a/src/mail.rs +++ b/src/mail.rs @@ -56,11 +56,7 @@ pub async fn refresh_oauth2_token() -> Result { ("client_secret", &client_secret), ]; - let response = match make_http_request(reqwest::Method::POST, &token_url)? - .form(&form_params) - .send() - .await - { + let response = match make_http_request(reqwest::Method::POST, &token_url)?.form(&form_params).send().await { Ok(res) => res, Err(e) => err!(format!("OAuth2 Token Refresh Error: {e}")), };