mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-30 10:06:12 +00:00
Use Rust inclusive range (stable in 1.26)
This commit is contained in:
1 parent
26717b0cd2
commit
532af6556d
1 file changed
+1
-1
+1
-1
@@ -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);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user