about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/check_unused.rs
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2023-05-24 14:19:22 +0000
committerMaybe Waffle <waffle.lapkin@gmail.com>2023-05-24 14:20:41 +0000
commitfb0f74a8c9e8b8f488ec5894d5d314caebf4c662 (patch)
tree4cab4cc84de840cc4cce01f3627a979fed59c54c /compiler/rustc_resolve/src/check_unused.rs
parent70db8369226c4d2386b25d66a49c8989247934bf (diff)
downloadrust-fb0f74a8c9e8b8f488ec5894d5d314caebf4c662.tar.gz
rust-fb0f74a8c9e8b8f488ec5894d5d314caebf4c662.zip
Use `Option::is_some_and` and `Result::is_ok_and` in the compiler
Diffstat (limited to 'compiler/rustc_resolve/src/check_unused.rs')
-rw-r--r--compiler/rustc_resolve/src/check_unused.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/check_unused.rs b/compiler/rustc_resolve/src/check_unused.rs
index 17c4a6be049..e5de5963195 100644
--- a/compiler/rustc_resolve/src/check_unused.rs
+++ b/compiler/rustc_resolve/src/check_unused.rs
@@ -469,7 +469,7 @@ impl Resolver<'_, '_> {
                 .r
                 .extern_prelude
                 .get(&extern_crate.ident)
-                .map_or(false, |entry| !entry.introduced_by_item)
+                .is_some_and(|entry| !entry.introduced_by_item)
             {
                 continue;
             }