aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-09-25 06:27:07 +0100
committerGitHub <[email protected]>2019-09-25 06:27:07 +0100
commit6bac2d0a637a6d0b3922a6f8fe05fa32d6d43b15 (patch)
treec3c2af75fa7be376506bf0ffe23fe8cad9c6c402 /crates/ra_ide_api/src/completion
parentc7420ddaaa76741d1eebe393406b38ba5596e54a (diff)
parent9c45a9e58632966984a79e18aa5221efb65e0ead (diff)
Merge #1904
1904: Remove redundant `clone()` r=matklad a=sinkuu Co-authored-by: Shotaro Yamada <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r--crates/ra_ide_api/src/completion/completion_context.rs2
-rw-r--r--crates/ra_ide_api/src/completion/presentation.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_context.rs b/crates/ra_ide_api/src/completion/completion_context.rs
index 59bd3689b..57542152f 100644
--- a/crates/ra_ide_api/src/completion/completion_context.rs
+++ b/crates/ra_ide_api/src/completion/completion_context.rs
@@ -94,7 +94,7 @@ impl<'a> CompletionContext<'a> {
94 // actual completion. 94 // actual completion.
95 let file = { 95 let file = {
96 let edit = AtomTextEdit::insert(offset, "intellijRulezz".to_string()); 96 let edit = AtomTextEdit::insert(offset, "intellijRulezz".to_string());
97 original_parse.reparse(&edit).tree().to_owned() 97 original_parse.reparse(&edit).tree()
98 }; 98 };
99 99
100 // First, let's try to complete a reference to some declaration. 100 // First, let's try to complete a reference to some declaration.
diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide_api/src/completion/presentation.rs
index ad414412b..b8aa433c1 100644
--- a/crates/ra_ide_api/src/completion/presentation.rs
+++ b/crates/ra_ide_api/src/completion/presentation.rs
@@ -76,7 +76,7 @@ impl Completions {
76 None, 76 None,
77 ), 77 ),
78 ScopeDef::MacroDef(mac) => { 78 ScopeDef::MacroDef(mac) => {
79 self.add_macro(ctx, Some(local_name.clone()), *mac); 79 self.add_macro(ctx, Some(local_name), *mac);
80 return; 80 return;
81 } 81 }
82 ScopeDef::Unknown => { 82 ScopeDef::Unknown => {