From 382144001967595937775cc014b9e3e156813187 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Wed, 18 Dec 2024 11:05:53 +0100 Subject: [PATCH] chore(ui): Make Clippy happy. --- crates/matrix-sdk-ui/src/timeline/controller/state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/matrix-sdk-ui/src/timeline/controller/state.rs b/crates/matrix-sdk-ui/src/timeline/controller/state.rs index 3b30de0279..bfe6b39955 100644 --- a/crates/matrix-sdk-ui/src/timeline/controller/state.rs +++ b/crates/matrix-sdk-ui/src/timeline/controller/state.rs @@ -798,7 +798,7 @@ impl TimelineStateTransaction<'_> { let mut idx = 0; while idx < self.items.len() { if self.items[idx].is_date_divider() - && self.items.get(idx + 1).map_or(true, |item| item.is_date_divider()) + && self.items.get(idx + 1).is_none_or(|item| item.is_date_divider()) { self.items.remove(idx); // don't increment idx because all elements have shifted