aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r--crates/ra_ide_api/src/impls.rs2
-rw-r--r--crates/ra_ide_api/src/line_index_utils.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/impls.rs b/crates/ra_ide_api/src/impls.rs
index f8a62bd71..97615b01f 100644
--- a/crates/ra_ide_api/src/impls.rs
+++ b/crates/ra_ide_api/src/impls.rs
@@ -65,7 +65,7 @@ fn impls_for_trait(
65 65
66 Some( 66 Some(
67 impls 67 impls
68 .lookup_impl_blocks_for_trait(&tr) 68 .lookup_impl_blocks_for_trait(tr)
69 .map(|imp| NavigationTarget::from_impl_block(db, imp)) 69 .map(|imp| NavigationTarget::from_impl_block(db, imp))
70 .collect(), 70 .collect(),
71 ) 71 )
diff --git a/crates/ra_ide_api/src/line_index_utils.rs b/crates/ra_ide_api/src/line_index_utils.rs
index 8f63db5f1..534009b98 100644
--- a/crates/ra_ide_api/src/line_index_utils.rs
+++ b/crates/ra_ide_api/src/line_index_utils.rs
@@ -213,7 +213,7 @@ impl RunningLineCol {
213 self.col_adjust = TextUnit::from(0); 213 self.col_adjust = TextUnit::from(0);
214 } 214 }
215 215
216 fn adjust_col(&mut self, range: &TextRange) { 216 fn adjust_col(&mut self, range: TextRange) {
217 self.col_adjust += range.len() - TextUnit::from(1); 217 self.col_adjust += range.len() - TextUnit::from(1);
218 } 218 }
219} 219}
@@ -244,7 +244,7 @@ pub fn translate_offset_with_edit(
244 let clamp = offset.min(x.start()); 244 let clamp = offset.min(x.start());
245 return res.to_line_col(clamp); 245 return res.to_line_col(clamp);
246 } else { 246 } else {
247 res.adjust_col(x); 247 res.adjust_col(*x);
248 } 248 }
249 } 249 }
250 } 250 }