summaryrefslogtreecommitdiff
path: root/src/components/mail/listing.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/mail/listing.rs')
-rw-r--r--src/components/mail/listing.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/components/mail/listing.rs b/src/components/mail/listing.rs
index 6e75a44b..72ec4703 100644
--- a/src/components/mail/listing.rs
+++ b/src/components/mail/listing.rs
@@ -84,8 +84,7 @@ impl<T> RowsState<T> {
self.thread_to_env
.get(&thread)
.iter()
- .map(|v| v.iter())
- .flatten()
+ .flat_map(|v| v.iter())
.any(|env_hash| self.selection[env_hash])
}
@@ -170,6 +169,11 @@ impl<T> RowsState<T> {
}
#[inline(always)]
+ pub fn is_empty(&self) -> bool {
+ self.len() == 0
+ }
+
+ #[inline(always)]
pub fn clear_selection(&mut self) {
for (k, v) in self.selection.iter_mut() {
if *v {