aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion
diff options
context:
space:
mode:
authorShotaro Yamada <[email protected]>2019-09-25 02:32:01 +0100
committerShotaro Yamada <[email protected]>2019-09-25 02:32:01 +0100
commit9c45a9e58632966984a79e18aa5221efb65e0ead (patch)
treec3c2af75fa7be376506bf0ffe23fe8cad9c6c402 /crates/ra_ide_api/src/completion
parent7e0fa715329571da8d5d551b1815303c39cf51c1 (diff)
Remove redundant clone()
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 => {