Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide_assists/src/handlers/extract_function.rs')
-rw-r--r--crates/ide_assists/src/handlers/extract_function.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/crates/ide_assists/src/handlers/extract_function.rs b/crates/ide_assists/src/handlers/extract_function.rs
index 1e21050911..c0cf3fac03 100644
--- a/crates/ide_assists/src/handlers/extract_function.rs
+++ b/crates/ide_assists/src/handlers/extract_function.rs
@@ -885,12 +885,9 @@ fn reference_is_exclusive(
/// checks if this expr requires `&mut` access, recurses on field access
fn expr_require_exclusive_access(ctx: &AssistContext, expr: &ast::Expr) -> Option<bool> {
- match expr {
- ast::Expr::MacroCall(_) => {
- // FIXME: expand macro and check output for mutable usages of the variable?
- return None;
- }
- _ => (),
+ if let ast::Expr::MacroCall(_) = expr {
+ // FIXME: expand macro and check output for mutable usages of the variable?
+ return None;
}
let parent = expr.syntax().parent()?;