Skip to content

Commit

Permalink
sstadick#21 fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
bennobuilder committed Mar 19, 2024
1 parent ac47eb7 commit 261fb61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ where

for interval in &self.intervals {
match merged.last_mut() {
Some(last) if last.stop >= interval.start => {
Some(last) if last.stop > interval.start => {
last.stop = std::cmp::max(last.stop, interval.stop);
}
_ => merged.push(interval.clone()),
Expand All @@ -371,7 +371,7 @@ where

for interval in &self.intervals {
match merged.last_mut() {
Some(last) if last.stop >= interval.start => {
Some(last) if last.stop > interval.start => {
last.stop = std::cmp::max(last.stop, interval.stop);
last.val = merge_fn(&last.val, &interval.val);
}
Expand Down

0 comments on commit 261fb61

Please sign in to comment.