Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/convert_nested_function_to_closure.rs')
-rw-r--r--crates/ide-assists/src/handlers/convert_nested_function_to_closure.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide-assists/src/handlers/convert_nested_function_to_closure.rs b/crates/ide-assists/src/handlers/convert_nested_function_to_closure.rs
index c30f3e1c3b..ea2752b881 100644
--- a/crates/ide-assists/src/handlers/convert_nested_function_to_closure.rs
+++ b/crates/ide-assists/src/handlers/convert_nested_function_to_closure.rs
@@ -63,7 +63,7 @@ pub(crate) fn convert_nested_function_to_closure(
/// Returns whether the given function is nested within the body of another function.
fn is_nested_function(function: &ast::Fn) -> bool {
- function.syntax().ancestors().skip(1).find_map(ast::Item::cast).map_or(false, |it| {
+ function.syntax().ancestors().skip(1).find_map(ast::Item::cast).is_some_and(|it| {
matches!(it, ast::Item::Fn(_) | ast::Item::Static(_) | ast::Item::Const(_))
})
}