From 8348a885684ccbd74ca3d9307f95639ef1bf6779 Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Thu, 9 Oct 2025 22:37:42 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(trash):=20encapsu?= =?UTF-8?q?late=20message=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - remove methods from trash and expose message list directly --- src/trash.rs | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/src/trash.rs b/src/trash.rs index 0476cc7..1057ba7 100644 --- a/src/trash.rs +++ b/src/trash.rs @@ -15,24 +15,9 @@ impl Trash { Ok(Trash { message_list }) } - /// Set the maximum results - pub fn set_max_results(&mut self, value: u32) { - self.message_list.set_max_results(value); - } - - /// Report the maximum results value - pub fn max_results(&self) -> u32 { - self.message_list.max_results() - } - - /// Add label to the labels collection - pub async fn add_labels(&mut self, credential: &str, labels: &[String]) -> Result<()> { - self.message_list.add_labels(credential, labels).await - } - - /// Set the query string - pub fn set_query(&mut self, query: &str) { - self.message_list.set_query(query) + /// return the message list struct + pub fn message_list(&mut self) -> &mut MessageList { + &mut self.message_list } /// Run the trash cli