Skip to content

Commit 02eb548

Browse files
authored
doc: use is_some_and instead of map_or(false, _) (rust-lang#15455)
see https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or changelog: none
2 parents 7dd3ecb + 2293095 commit 02eb548

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

book/src/development/common_tools_writing_lints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl LateLintPass<'_> for MyStructLint {
141141
// we are looking for the `DefId` of `Drop` trait in lang items
142142
.drop_trait()
143143
// then we use it with our type `ty` by calling `implements_trait` from Clippy's utils
144-
.map_or(false, |id| implements_trait(cx, ty, id, &[])) {
144+
.is_some_and(|id| implements_trait(cx, ty, id, &[])) {
145145
// `expr` implements `Drop` trait
146146
}
147147
}

0 commit comments

Comments
 (0)