diff --git a/crates/ide_assists/src/handlers/extract_variable.rs b/crates/ide_assists/src/handlers/extract_variable.rs index 19525fa254e..61a8750b0c4 100644 --- a/crates/ide_assists/src/handlers/extract_variable.rs +++ b/crates/ide_assists/src/handlers/extract_variable.rs @@ -161,7 +161,7 @@ fn valid_target_expr(node: SyntaxNode) -> Option { } fn get_receiver_type(ctx: &AssistContext, expression: &ast::Expr) -> Option { - let receiver = get_receiver(expression.to_owned())?; + let receiver = get_receiver(expression.clone())?; Some(ctx.sema.type_of_expr(&receiver)?.original()) }