Enable clippy::useless_conversion (#8724)
This PR enables the [`clippy::useless_conversion`](https://rust-lang.github.io/rust-clippy/master/index.html#/useless_conversion) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
@@ -987,7 +987,7 @@ fn offset_for_row(s: &str, target: u32) -> (u32, usize) {
|
||||
if row >= target {
|
||||
break;
|
||||
}
|
||||
offset += line.len() as usize;
|
||||
offset += line.len();
|
||||
}
|
||||
(row, offset)
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ impl TabSnapshot {
|
||||
let (collapsed, expanded_char_column, to_next_stop) =
|
||||
self.collapse_tabs(chars, expanded, bias);
|
||||
(
|
||||
FoldPoint::new(output.row(), collapsed as u32),
|
||||
FoldPoint::new(output.row(), collapsed),
|
||||
expanded_char_column,
|
||||
to_next_stop,
|
||||
)
|
||||
@@ -513,7 +513,7 @@ impl<'a> Iterator for TabChunks<'a> {
|
||||
} else {
|
||||
self.chunk.text = &self.chunk.text[1..];
|
||||
let tab_size = if self.input_column < self.max_expansion_column {
|
||||
self.tab_size.get() as u32
|
||||
self.tab_size.get()
|
||||
} else {
|
||||
1
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user