.clone() over .to_owned()
This commit is contained in:
parent
2724b35490
commit
8c0b848694
@ -161,7 +161,7 @@ fn valid_target_expr(node: SyntaxNode) -> Option<ast::Expr> {
|
||||
}
|
||||
|
||||
fn get_receiver_type(ctx: &AssistContext, expression: &ast::Expr) -> Option<hir::Type> {
|
||||
let receiver = get_receiver(expression.to_owned())?;
|
||||
let receiver = get_receiver(expression.clone())?;
|
||||
Some(ctx.sema.type_of_expr(&receiver)?.original())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user