aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/body/lower.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-02-05 16:04:50 +0000
committerGitHub <[email protected]>2021-02-05 16:04:50 +0000
commit737e7a7b751f300de3a55a79ce530ea6e15fb64d (patch)
treeacd545965ff29bd45c44c338b13e36da58714714 /crates/hir_def/src/body/lower.rs
parent2a75594ee894baad5339ff9708ca70f6f69e0a36 (diff)
parent79d103d5b42c5b207c28b6eb8a6ab42f0c685ec5 (diff)
Merge #7574
7574: Remove various redundant clones r=kjeremy a=yoshuawuyts I noticed when running clippy through RA that there are a few instances where `clone` is called where it's not actually needed. I figured a small patch to remove these might be welcome here. Thanks! Co-authored-by: Yoshua Wuyts <[email protected]>
Diffstat (limited to 'crates/hir_def/src/body/lower.rs')
-rw-r--r--crates/hir_def/src/body/lower.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_def/src/body/lower.rs b/crates/hir_def/src/body/lower.rs
index 28b11cdde..c18001e15 100644
--- a/crates/hir_def/src/body/lower.rs
+++ b/crates/hir_def/src/body/lower.rs
@@ -712,7 +712,7 @@ impl ExprCollector<'_> {
712 let statements = 712 let statements =
713 block.statements().filter_map(|s| self.collect_stmt(s)).flatten().collect(); 713 block.statements().filter_map(|s| self.collect_stmt(s)).flatten().collect();
714 let tail = block.tail_expr().map(|e| self.collect_expr(e)); 714 let tail = block.tail_expr().map(|e| self.collect_expr(e));
715 let syntax_node_ptr = AstPtr::new(&block.clone().into()); 715 let syntax_node_ptr = AstPtr::new(&block.into());
716 let expr_id = self.alloc_expr( 716 let expr_id = self.alloc_expr(
717 Expr::Block { id: block_id, statements, tail, label: None }, 717 Expr::Block { id: block_id, statements, tail, label: None },
718 syntax_node_ptr, 718 syntax_node_ptr,