Skip to content

Commit 261ae2e

Browse files
committed
fix warning
1 parent 593454a commit 261ae2e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clippy_lints/src/methods/unnecessary_map_or.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub(super) fn check(
7272
),
7373
"standard comparison",
7474
)
75-
} else if def_bool == false && msrv.meets(msrvs::OPTION_IS_SOME_AND) {
75+
} else if !def_bool && msrv.meets(msrvs::OPTION_IS_SOME_AND) {
7676
let sugg = if is_type_diagnostic_item(cx, recv_ty, sym::Option) {
7777
"is_some_and"
7878
} else {
@@ -96,10 +96,10 @@ pub(super) fn check(
9696
cx,
9797
UNNECESSARY_MAP_OR,
9898
expr.span,
99-
&format!("`map_or` is redundant, use {} instead", method),
99+
&format!("`map_or` is redundant, use {method} instead"),
100100
"try",
101101
sugg,
102102
Applicability::Unspecified,
103-
)
103+
);
104104
}
105105
}

0 commit comments

Comments
 (0)