From 477892d0d40843a119445b7f3e50d19049cad582 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Sun, 15 Dec 2024 23:20:18 -0500 Subject: [PATCH] Fix `clippy::unnecessary_map_or` lint Use `is_some_and` instead. --- examples/vello_editor/src/text.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/vello_editor/src/text.rs b/examples/vello_editor/src/text.rs index 8db2fbbf..55354f4e 100644 --- a/examples/vello_editor/src/text.rs +++ b/examples/vello_editor/src/text.rs @@ -96,7 +96,7 @@ impl Editor { } pub fn cursor_blink(&mut self) { - self.cursor_visible = self.start_time.map_or(false, |start_time| { + self.cursor_visible = self.start_time.is_some_and(|start_time| { let elapsed = Instant::now().duration_since(start_time); (elapsed.as_millis() / self.blink_period.as_millis()) % 2 == 0 });