From 24c928f2824f49ddcaef75000fcc0f616947fa10 Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Thu, 2 Oct 2025 16:06:35 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(gmail):=20remove?= =?UTF-8?q?=20unused=20client=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - remove client.rs due to project restructuring - no longer needed after integrating gmail functionality elsewhere --- src/client.rs | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 src/client.rs diff --git a/src/client.rs b/src/client.rs deleted file mode 100644 index 23a9626..0000000 --- a/src/client.rs +++ /dev/null @@ -1,29 +0,0 @@ -use google_gmail1::{ - common::Client, - hyper_rustls::{self, HttpsConnector}, - hyper_util::{self, client::legacy::connect::HttpConnector}, - yup_oauth2::{self, ApplicationSecret, authenticator::Authenticator}, -}; - -/// Get auth for gmail -pub async fn get_auth(secret: ApplicationSecret) -> Authenticator> { - yup_oauth2::InstalledFlowAuthenticator::builder( - secret, - yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect, - ) - .build() - .await - .unwrap() -} - -/// Get client for gmail -pub fn get_client() -> Client> { - hyper_util::client::legacy::Client::builder(hyper_util::rt::TokioExecutor::new()).build( - hyper_rustls::HttpsConnectorBuilder::new() - .with_native_roots() - .unwrap() - .https_or_http() - .enable_http1() - .build(), - ) -}