Skip to content

Commit

Permalink
Use Rust inclusive range (stable in 1.26)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnavb authored and sharkdp committed Nov 11, 2018
1 parent 26717b0 commit 532af65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diff.rs
Expand Up @@ -34,7 +34,7 @@ pub fn get_git_diff(filename: &str) -> Option<LineChanges> {

let mark_section =
|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);
}
};
Expand Down

0 comments on commit 532af65

Please sign in to comment.