aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
authorAlan Du <[email protected]>2019-06-03 15:07:00 +0100
committerAlan Du <[email protected]>2019-06-04 23:05:07 +0100
commitb9af1d7c428bac3e2efb69e0dadda72938ce3b3c (patch)
treefb5144f91b879904f363a383b24ce38f0b5166a1 /crates/ra_ide_api
parentdddcb0ad940a8010bb5df3d44526729d8e705213 (diff)
Fix clippy::match_ref_pats
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r--crates/ra_ide_api/src/line_index_utils.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_ide_api/src/line_index_utils.rs b/crates/ra_ide_api/src/line_index_utils.rs
index 799a920ad..a03467011 100644
--- a/crates/ra_ide_api/src/line_index_utils.rs
+++ b/crates/ra_ide_api/src/line_index_utils.rs
@@ -133,9 +133,9 @@ impl<'a> Edits<'a> {
133 } 133 }
134 134
135 fn next_steps(&mut self, step: &Step) -> NextSteps { 135 fn next_steps(&mut self, step: &Step) -> NextSteps {
136 let step_pos = match step { 136 let step_pos = match *step {
137 &Step::Newline(n) => n, 137 Step::Newline(n) => n,
138 &Step::Utf16Char(r) => r.end(), 138 Step::Utf16Char(r) => r.end(),
139 }; 139 };
140 let res = match &mut self.current { 140 let res = match &mut self.current {
141 Some(edit) => { 141 Some(edit) => {
@@ -181,9 +181,9 @@ impl<'a> Edits<'a> {
181 if self.acc_diff == 0 { 181 if self.acc_diff == 0 {
182 x.clone() 182 x.clone()
183 } else { 183 } else {
184 match x { 184 match *x {
185 &Step::Newline(n) => Step::Newline(self.translate(n)), 185 Step::Newline(n) => Step::Newline(self.translate(n)),
186 &Step::Utf16Char(r) => Step::Utf16Char(self.translate_range(r)), 186 Step::Utf16Char(r) => Step::Utf16Char(self.translate_range(r)),
187 } 187 }
188 } 188 }
189 } 189 }