Skip to content

Commit 8c0b848

Browse files
committed
.clone() over .to_owned()
1 parent 2724b35 commit 8c0b848

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ide_assists/src/handlers/extract_variable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ fn valid_target_expr(node: SyntaxNode) -> Option<ast::Expr> {
161161
}
162162

163163
fn get_receiver_type(ctx: &AssistContext, expression: &ast::Expr) -> Option<hir::Type> {
164-
let receiver = get_receiver(expression.to_owned())?;
164+
let receiver = get_receiver(expression.clone())?;
165165
Some(ctx.sema.type_of_expr(&receiver)?.original())
166166
}
167167

0 commit comments

Comments
 (0)