doc: use is_some_and instead of map_or(false, _) (#15455)
see https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or changelog: none
This commit is contained in:
commit
02eb548054
1 changed files with 1 additions and 1 deletions
|
|
@ -141,7 +141,7 @@ impl LateLintPass<'_> for MyStructLint {
|
|||
// we are looking for the `DefId` of `Drop` trait in lang items
|
||||
.drop_trait()
|
||||
// then we use it with our type `ty` by calling `implements_trait` from Clippy's utils
|
||||
.map_or(false, |id| implements_trait(cx, ty, id, &[])) {
|
||||
.is_some_and(|id| implements_trait(cx, ty, id, &[])) {
|
||||
// `expr` implements `Drop` trait
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue