Skip to content

Commit 07a0c73

Browse files
committed
Address unnecessary_map_or warnings
1 parent dd684d1 commit 07a0c73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/format_args.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ impl<'tcx> FormatArgsExpr<'_, 'tcx> {
532532
let ty = ty.peel_refs();
533533

534534
if let Some(feature) = self.ty_feature_map.get(&ty)
535-
&& feature.map_or(true, |feature| self.cx.tcx.features().enabled(feature))
535+
&& feature.is_none_or(|feature| self.cx.tcx.features().enabled(feature))
536536
{
537537
return true;
538538
}
@@ -543,7 +543,7 @@ impl<'tcx> FormatArgsExpr<'_, 'tcx> {
543543
&& implements_trait(self.cx, ty, deref_trait_id, &[])
544544
&& let Some(target_ty) = self.cx.get_associated_type(ty, deref_trait_id, "Target")
545545
&& let Some(feature) = self.ty_feature_map.get(&target_ty)
546-
&& feature.map_or(true, |feature| self.cx.tcx.features().enabled(feature))
546+
&& feature.is_none_or(|feature| self.cx.tcx.features().enabled(feature))
547547
{
548548
return true;
549549
}

0 commit comments

Comments
 (0)