mirror of
https://github.com/sharkdp/bat.git
synced 2025-08-11 00:31:53 +02:00
Improve iterator usage
This commit is contained in:
committed by
Martin Nordholts
parent
372e42f350
commit
7956485e37
@ -175,8 +175,8 @@ impl<'b> Controller<'b> {
|
||||
let mut line_ranges: Vec<LineRange> = vec![];
|
||||
|
||||
if let Some(line_changes) = line_changes {
|
||||
for line in line_changes.keys() {
|
||||
let line = *line as usize;
|
||||
for &line in line_changes.keys() {
|
||||
let line = line as usize;
|
||||
line_ranges.push(LineRange::new(line - context, line + context));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user