diff options
| author | Philipp Krones <hello@philkrones.com> | 2025-08-11 11:04:51 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-11 11:04:51 +0000 |
| commit | 02eb5480544ea06992ed26a0a5e56a12c67d9c3c (patch) | |
| tree | f1866ef59e71f6a0a483955be17b6b3050deb011 | |
| parent | 7dd3ecb1f94efe8539d4ec34187c4c65be1225a5 (diff) | |
| parent | 2293095c9170c465c12f197a8476e88234fd7bee (diff) | |
| download | rust-02eb5480544ea06992ed26a0a5e56a12c67d9c3c.tar.gz rust-02eb5480544ea06992ed26a0a5e56a12c67d9c3c.zip | |
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
| -rw-r--r-- | book/src/development/common_tools_writing_lints.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/book/src/development/common_tools_writing_lints.md b/book/src/development/common_tools_writing_lints.md index e23b32039c9..3bec3ce33af 100644 --- a/book/src/development/common_tools_writing_lints.md +++ b/book/src/development/common_tools_writing_lints.md @@ -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 } } |
