Skip to content

Commit

Permalink
Re-order SubAssign impl
Browse files Browse the repository at this point in the history
  • Loading branch information
Techassi committed Sep 18, 2023
1 parent 198ae50 commit 6737e51
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/duration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ impl Sub for Duration {
}
}

impl SubAssign for Duration {
fn sub_assign(&mut self, rhs: Self) {
self.0.sub_assign(rhs.0)
}
}

impl Mul<u32> for Duration {
type Output = Self;

Expand Down Expand Up @@ -243,12 +249,6 @@ impl Div<Duration> for u32 {
}
}

impl SubAssign for Duration {
fn sub_assign(&mut self, rhs: Self) {
self.0.sub_assign(rhs.0)
}
}

impl Duration {
/// Creates a new [`Duration`] from the specified number of whole seconds.
pub const fn from_secs(secs: u64) -> Self {
Expand Down

0 comments on commit 6737e51

Please sign in to comment.