aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/data.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/data.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/data.rs')
-rw-r--r--crates/hir_def/src/data.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_def/src/data.rs b/crates/hir_def/src/data.rs
index 42fcca386..d3380e0f4 100644
--- a/crates/hir_def/src/data.rs
+++ b/crates/hir_def/src/data.rs
@@ -43,7 +43,7 @@ impl FunctionData {
43 name: func.name.clone(), 43 name: func.name.clone(),
44 params: func.params.iter().map(|id| item_tree[*id].clone()).collect(), 44 params: func.params.iter().map(|id| item_tree[*id].clone()).collect(),
45 ret_type: item_tree[func.ret_type].clone(), 45 ret_type: item_tree[func.ret_type].clone(),
46 attrs: item_tree.attrs(db, krate, ModItem::from(loc.id.value).into()).clone(), 46 attrs: item_tree.attrs(db, krate, ModItem::from(loc.id.value).into()),
47 has_self_param: func.has_self_param, 47 has_self_param: func.has_self_param,
48 has_body: func.has_body, 48 has_body: func.has_body,
49 is_unsafe: func.is_unsafe, 49 is_unsafe: func.is_unsafe,