From 4adca7088150ecfe014e7ed328c0892f5235edf2 Mon Sep 17 00:00:00 2001 From: Rina Fujino Date: Thu, 9 Jan 2025 17:11:10 +0100 Subject: [PATCH] fix: clippy warning unnecessary_map_or Signed-off-by: Rina Fujino --- crates/common/tedge_config_macros/impl/src/input/validate.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/common/tedge_config_macros/impl/src/input/validate.rs b/crates/common/tedge_config_macros/impl/src/input/validate.rs index b9c3667739a..6c9a7223943 100644 --- a/crates/common/tedge_config_macros/impl/src/input/validate.rs +++ b/crates/common/tedge_config_macros/impl/src/input/validate.rs @@ -117,7 +117,7 @@ impl FieldOrGroup { pub fn is_called(&self, target: &syn::Ident) -> bool { self.ident() == target || match self { - Self::Field(field) => field.rename().map_or(false, |rename| *target == rename), + Self::Field(field) => field.rename().is_some_and(|rename| *target == rename), // Groups don't support renaming at the moment Self::Group(_) => false, Self::Multi(_) => false,