From ebdee366b0e16d1d019db2f5c22a730b4451194f Mon Sep 17 00:00:00 2001 From: kjeremy Date: Mon, 6 Jul 2020 17:13:55 -0400 Subject: Clippy perf warnings Removes redundant clones --- crates/ra_syntax/src/ast/edit.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'crates/ra_syntax/src/ast') diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs index 2ef173a03..940c30c7f 100644 --- a/crates/ra_syntax/src/ast/edit.rs +++ b/crates/ra_syntax/src/ast/edit.rs @@ -299,12 +299,8 @@ impl ast::UseTree { Some(it) => it, None => return self.clone(), }; - let use_tree = make::use_tree( - suffix.clone(), - self.use_tree_list(), - self.alias(), - self.star_token().is_some(), - ); + let use_tree = + make::use_tree(suffix, self.use_tree_list(), self.alias(), self.star_token().is_some()); let nested = make::use_tree_list(iter::once(use_tree)); return make::use_tree(prefix.clone(), Some(nested), None, false); -- cgit v1.2.3