10504: Remove needless clone r=lnicola a=k-nasa

## Why

Delete clones for efficiency

## What

- I erased unnecessary clones


Co-authored-by: k-nasa <htilcs1115@gmail.com>
This commit is contained in:
bors[bot] 2021-10-10 07:17:52 +00:00 committed by GitHub
commit 64ca0f63bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 10 additions and 10 deletions

View file

@ -336,7 +336,7 @@ impl AstNode for CallableExpr {
{
if let Some(it) = ast::CallExpr::cast(syntax.clone()) {
Some(Self::Call(it))
} else if let Some(it) = ast::MethodCallExpr::cast(syntax.clone()) {
} else if let Some(it) = ast::MethodCallExpr::cast(syntax) {
Some(Self::MethodCall(it))
} else {
None