Alternative fix for #37 that lets the code hobble on
This commit is contained in:
parent
3a938ae1d3
commit
ff5f4caaa3
3 changed files with 6 additions and 6 deletions
|
|
@ -57,7 +57,7 @@ impl UnifiedDiffHunkRange {
|
|||
impl fmt::Display for UnifiedDiffHunkRange {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let mut beginning = self.start() + 1;
|
||||
let len = self.end() - self.start();
|
||||
let len = self.end().saturating_sub(self.start());
|
||||
if len == 1 {
|
||||
write!(f, "{}", beginning)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue