Clippy trivially_copy_pass_by_ref

This commit is contained in:
Jeremy Kolb 2019-07-05 12:02:32 -04:00
parent ec6f71576a
commit 001e34e6e3
11 changed files with 30 additions and 30 deletions

View file

@ -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);
}
}
}