aboutsummaryrefslogtreecommitdiff
path: root/crates/assists
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/assists
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/assists')
-rw-r--r--crates/assists/src/assist_context.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/assists/src/assist_context.rs b/crates/assists/src/assist_context.rs
index 8d93edba2..bba6c08e0 100644
--- a/crates/assists/src/assist_context.rs
+++ b/crates/assists/src/assist_context.rs
@@ -162,7 +162,7 @@ impl Assists {
162 } else { 162 } else {
163 None 163 None
164 }; 164 };
165 assist.source_change = source_change.clone(); 165 assist.source_change = source_change;
166 166
167 self.buf.push(assist); 167 self.buf.push(assist);
168 Some(()) 168 Some(())
@@ -242,7 +242,7 @@ impl AssistBuilder {
242 } 242 }
243 pub(crate) fn create_file(&mut self, dst: AnchoredPathBuf, content: impl Into<String>) { 243 pub(crate) fn create_file(&mut self, dst: AnchoredPathBuf, content: impl Into<String>) {
244 let file_system_edit = 244 let file_system_edit =
245 FileSystemEdit::CreateFile { dst: dst.clone(), initial_contents: content.into() }; 245 FileSystemEdit::CreateFile { dst: dst, initial_contents: content.into() };
246 self.source_change.push_file_system_edit(file_system_edit); 246 self.source_change.push_file_system_edit(file_system_edit);
247 } 247 }
248 248