melib/backends: add LazyCountSet::contains method

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
pull/337/head
Manos Pitsidianakis 2024-01-01 14:34:05 +02:00
parent 33408146a1
commit 31401fa35c
Signed by: Manos Pitsidianakis
GPG Key ID: 7729C7707F7E09D0
1 changed files with 5 additions and 0 deletions

View File

@ -761,6 +761,11 @@ impl LazyCountSet {
pub fn remove(&mut self, env_hash: EnvelopeHash) -> bool {
self.set.remove(&env_hash)
}
#[inline(always)]
pub fn contains(&self, value: &EnvelopeHash) -> bool {
self.set.contains(value)
}
}
pub struct IsSubscribedFn(pub Box<dyn Fn(&str) -> bool + Send + Sync>);