Skip to content

Commit

Permalink
Use overflowing_(add|sub)_offset in Add and Sub impls
Browse files Browse the repository at this point in the history
  • Loading branch information
pitdicker committed Sep 23, 2023
1 parent f15825e commit 3afa49b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/offset/fixed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl Add<FixedOffset> for NaiveTime {

#[inline]
fn add(self, rhs: FixedOffset) -> NaiveTime {
add_with_leapsecond(&self, rhs.local_minus_utc)
self.overflowing_add_offset(rhs).0
}
}

Expand All @@ -213,7 +213,7 @@ impl Sub<FixedOffset> for NaiveTime {

#[inline]
fn sub(self, rhs: FixedOffset) -> NaiveTime {
add_with_leapsecond(&self, -rhs.local_minus_utc)
self.overflowing_sub_offset(rhs).0
}
}

Expand Down

0 comments on commit 3afa49b

Please sign in to comment.