mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Clippy trivially_copy_pass_by_ref
This commit is contained in:
parent
ec6f71576a
commit
001e34e6e3
11 changed files with 30 additions and 30 deletions
|
@ -213,7 +213,7 @@ impl RunningLineCol {
|
|||
self.col_adjust = TextUnit::from(0);
|
||||
}
|
||||
|
||||
fn adjust_col(&mut self, range: &TextRange) {
|
||||
fn adjust_col(&mut self, range: TextRange) {
|
||||
self.col_adjust += range.len() - TextUnit::from(1);
|
||||
}
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ pub fn translate_offset_with_edit(
|
|||
let clamp = offset.min(x.start());
|
||||
return res.to_line_col(clamp);
|
||||
} else {
|
||||
res.adjust_col(x);
|
||||
res.adjust_col(*x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue