From a84ba4d42fcdb38be514178eb9fced777ba76055 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Sat, 6 Jan 2024 11:07:53 +0100 Subject: Mailbox View made more readable --- src/mail/query.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/mail/query.rs') diff --git a/src/mail/query.rs b/src/mail/query.rs index 5beff37..70feb89 100644 --- a/src/mail/query.rs +++ b/src/mail/query.rs @@ -13,6 +13,7 @@ pub struct Query<'a,'b> { pub scope: QueryScope, } +#[allow(dead_code)] pub enum QueryScope { Index, Partial, @@ -106,6 +107,7 @@ impl<'a> QueryResult<'a> { } } + #[allow(dead_code)] pub fn index(&self) -> &IndexEntry { match self { Self::IndexResult { index, .. } => index, @@ -114,7 +116,7 @@ impl<'a> QueryResult<'a> { } } - pub fn metadata(&self) -> Option<&MailMeta> { + pub fn metadata(&'a self) -> Option<&'a MailMeta> { match self { Self::IndexResult { .. } => None, Self::PartialResult { metadata, .. } => Some(metadata), @@ -122,7 +124,8 @@ impl<'a> QueryResult<'a> { } } - pub fn content(&self) -> Option<&[u8]> { + #[allow(dead_code)] + pub fn content(&'a self) -> Option<&'a [u8]> { match self { Self::FullResult { content, .. } => Some(content), _ => None, -- cgit v1.2.3