From 1ca6cd5de0656910213425e1d8f05256af820f21 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Sat, 6 Jan 2024 11:33:40 +0100 Subject: search is re-enabled --- src/mail/query.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mail') diff --git a/src/mail/query.rs b/src/mail/query.rs index 70feb89..7b26cb9 100644 --- a/src/mail/query.rs +++ b/src/mail/query.rs @@ -21,7 +21,7 @@ pub enum QueryScope { } impl<'a,'b> Query<'a,'b> { - pub async fn fetch(&self) -> Result> { + pub async fn fetch(&self) -> Result>> { match self.scope { QueryScope::Index => self.index(), QueryScope::Partial => self.partial().await, @@ -31,7 +31,7 @@ impl<'a,'b> Query<'a,'b> { // --- functions below are private *for reasons* - fn index(&self) -> Result> { + fn index(&self) -> Result>> { self .emails .iter() @@ -47,7 +47,7 @@ impl<'a,'b> Query<'a,'b> { .collect::, _>>() } - async fn partial(&self) -> Result> { + async fn partial(&self) -> Result>> { let meta = self.frozen.mailbox.fetch_meta(self.emails).await?; let result = meta .into_iter() @@ -61,7 +61,7 @@ impl<'a,'b> Query<'a,'b> { /// AND GENERATE SO MUCH NETWORK TRAFFIC. /// THIS FUNCTION SHOULD BE REWRITTEN, FOR EXAMPLE WITH /// SOMETHING LIKE AN ITERATOR - async fn full(&self) -> Result> { + async fn full(&self) -> Result>> { let meta_list = self.partial().await?; meta_list .into_iter() -- cgit v1.2.3