diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-06 11:33:40 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-06 11:33:40 +0100 |
commit | 1ca6cd5de0656910213425e1d8f05256af820f21 (patch) | |
tree | 0b121b243b5b6f0fc4f16acbf4f3e8b9fda9e5aa /src/mail/query.rs | |
parent | 1b64867ea3156424b55262f4a683cde0618e45f7 (diff) | |
download | aerogramme-1ca6cd5de0656910213425e1d8f05256af820f21.tar.gz aerogramme-1ca6cd5de0656910213425e1d8f05256af820f21.zip |
search is re-enabled
Diffstat (limited to 'src/mail/query.rs')
-rw-r--r-- | src/mail/query.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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<Vec<QueryResult>> { + pub async fn fetch(&self) -> Result<Vec<QueryResult<'a>>> { 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<Vec<QueryResult>> { + fn index(&self) -> Result<Vec<QueryResult<'a>>> { self .emails .iter() @@ -47,7 +47,7 @@ impl<'a,'b> Query<'a,'b> { .collect::<Result<Vec<_>, _>>() } - async fn partial(&self) -> Result<Vec<QueryResult>> { + async fn partial(&self) -> Result<Vec<QueryResult<'a>>> { 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<Vec<QueryResult>> { + async fn full(&self) -> Result<Vec<QueryResult<'a>>> { let meta_list = self.partial().await?; meta_list .into_iter() |