From 3ad8b8b51b0040a9b56e97d62c713631f27d2883 Mon Sep 17 00:00:00 2001 From: EdJoPaTo Date: Sat, 25 May 2024 03:33:19 +0200 Subject: [PATCH] refactor(lint): use clippy::or_fun_call (#1138) --- Cargo.toml | 1 + src/widgets/calendar.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 74906f0400..747ecdb8d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -90,6 +90,7 @@ mixed_read_write_in_expression = "warn" mod_module_files = "warn" needless_pass_by_ref_mut = "warn" needless_raw_strings = "warn" +or_fun_call = "warn" redundant_type_annotations = "warn" rest_pat_in_fully_bound_structs = "warn" string_lit_chars_any = "warn" diff --git a/src/widgets/calendar.rs b/src/widgets/calendar.rs index 40ef65f169..1c6d65139c 100644 --- a/src/widgets/calendar.rs +++ b/src/widgets/calendar.rs @@ -203,7 +203,7 @@ impl CalendarEventStore { let mut res = Self::default(); res.add( OffsetDateTime::now_local() - .unwrap_or(OffsetDateTime::now_utc()) + .unwrap_or_else(|_| OffsetDateTime::now_utc()) .date(), style.into(), );