Skip to content

Commit

Permalink
fix: clippy warning unnecessary_map_or
Browse files Browse the repository at this point in the history
Signed-off-by: Rina Fujino <[email protected]>
  • Loading branch information
rina23q committed Jan 9, 2025
1 parent bd06fcb commit 4adca70
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4adca70

Please sign in to comment.