From fb0f74a8c9e8b8f488ec5894d5d314caebf4c662 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Wed, 24 May 2023 14:19:22 +0000 Subject: Use `Option::is_some_and` and `Result::is_ok_and` in the compiler --- compiler/rustc_data_structures/src/obligation_forest/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_data_structures/src') diff --git a/compiler/rustc_data_structures/src/obligation_forest/mod.rs b/compiler/rustc_data_structures/src/obligation_forest/mod.rs index 27a869eb7cd..a47908648ba 100644 --- a/compiler/rustc_data_structures/src/obligation_forest/mod.rs +++ b/compiler/rustc_data_structures/src/obligation_forest/mod.rs @@ -366,7 +366,7 @@ impl ObligationForest { && self .error_cache .get(&obligation_tree_id) - .map_or(false, |errors| errors.contains(v.key())); + .is_some_and(|errors| errors.contains(v.key())); if already_failed { Err(()) -- cgit 1.4.1-3-g733a5