mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-21 20:38:44 +00:00
Use Rust inclusive range (stable in 1.26)
This commit is contained in:
parent
26717b0cd2
commit
532af6556d
@ -34,7 +34,7 @@ pub fn get_git_diff(filename: &str) -> Option<LineChanges> {
|
|||||||
|
|
||||||
let mark_section =
|
let mark_section =
|
||||||
|line_changes: &mut LineChanges, start: u32, end: i32, change: LineChange| {
|
|line_changes: &mut LineChanges, start: u32, end: i32, change: LineChange| {
|
||||||
for line in start..(end + 1) as u32 {
|
for line in start..=end as u32 {
|
||||||
line_changes.insert(line, change);
|
line_changes.insert(line, change);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user