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 } }