From 44c9220eb169ee0ae0966eb66def1ce9b43299df Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Thu, 2 Oct 2025 13:45:16 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(list):=20refactor?= =?UTF-8?q?=20list=20command=20to=20accept=20credential=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - update list command to accept credential file path - create gmail hub in list command --- src/list_cli.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/list_cli.rs b/src/list_cli.rs index c48e0b1..24756fa 100644 --- a/src/list_cli.rs +++ b/src/list_cli.rs @@ -1,16 +1,13 @@ use clap::Parser; -use cull_gmail::List; -use google_gmail1::{ - Gmail, hyper_rustls::HttpsConnector, hyper_util::client::legacy::connect::HttpConnector, -}; +use cull_gmail::{Error, List}; /// Command line options for the list subcommand #[derive(Debug, Parser)] pub struct ListCli {} impl ListCli { - pub(crate) async fn run(&self, hub: Gmail>) { - let list = List::new(hub); - list.run().await; + pub(crate) async fn run(&self, credential_file: &str) -> Result<(), Error> { + let list = List::new(credential_file).await?; + list.run().await } }