Move `SubAssign<OldDuration> next to `Sub<OldDuration`
This commit is contained in:
parent
d9a50cb767
commit
19466e6ff4
|
@ -1378,6 +1378,13 @@ impl Sub<OldDuration> for NaiveDate {
|
|||
}
|
||||
}
|
||||
|
||||
impl SubAssign<OldDuration> for NaiveDate {
|
||||
#[inline]
|
||||
fn sub_assign(&mut self, rhs: OldDuration) {
|
||||
*self = self.sub(rhs);
|
||||
}
|
||||
}
|
||||
|
||||
/// Subtracts another `NaiveDate` from the current date.
|
||||
/// Returns a `Duration` of integral numbers.
|
||||
///
|
||||
|
@ -1414,13 +1421,6 @@ impl Sub<NaiveDate> for NaiveDate {
|
|||
}
|
||||
}
|
||||
|
||||
impl SubAssign<OldDuration> for NaiveDate {
|
||||
#[inline]
|
||||
fn sub_assign(&mut self, rhs: OldDuration) {
|
||||
*self = self.sub(rhs);
|
||||
}
|
||||
}
|
||||
|
||||
/// The `Debug` output of the naive date `d` is same to
|
||||
/// [`d.format("%Y-%m-%d")`](../format/strftime/index.html).
|
||||
///
|
||||
|
|
|
@ -1272,6 +1272,13 @@ impl Sub<OldDuration> for NaiveDateTime {
|
|||
}
|
||||
}
|
||||
|
||||
impl SubAssign<OldDuration> for NaiveDateTime {
|
||||
#[inline]
|
||||
fn sub_assign(&mut self, rhs: OldDuration) {
|
||||
*self = self.sub(rhs);
|
||||
}
|
||||
}
|
||||
|
||||
/// Subtracts another `NaiveDateTime` from the current date and time.
|
||||
/// This does not overflow or underflow at all.
|
||||
///
|
||||
|
@ -1327,13 +1334,6 @@ impl Sub<NaiveDateTime> for NaiveDateTime {
|
|||
}
|
||||
}
|
||||
|
||||
impl SubAssign<OldDuration> for NaiveDateTime {
|
||||
#[inline]
|
||||
fn sub_assign(&mut self, rhs: OldDuration) {
|
||||
*self = self.sub(rhs);
|
||||
}
|
||||
}
|
||||
|
||||
/// The `Debug` output of the naive date and time `dt` is same to
|
||||
/// [`dt.format("%Y-%m-%dT%H:%M:%S%.f")`](../format/strftime/index.html).
|
||||
///
|
||||
|
|
|
@ -1126,6 +1126,13 @@ impl Sub<OldDuration> for NaiveTime {
|
|||
}
|
||||
}
|
||||
|
||||
impl SubAssign<OldDuration> for NaiveTime {
|
||||
#[inline]
|
||||
fn sub_assign(&mut self, rhs: OldDuration) {
|
||||
*self = self.sub(rhs);
|
||||
}
|
||||
}
|
||||
|
||||
/// Subtracts another `NaiveTime` from the current time.
|
||||
/// Returns a `Duration` within +/- 1 day.
|
||||
/// This does not overflow or underflow at all.
|
||||
|
@ -1186,13 +1193,6 @@ impl Sub<NaiveTime> for NaiveTime {
|
|||
}
|
||||
}
|
||||
|
||||
impl SubAssign<OldDuration> for NaiveTime {
|
||||
#[inline]
|
||||
fn sub_assign(&mut self, rhs: OldDuration) {
|
||||
*self = self.sub(rhs);
|
||||
}
|
||||
}
|
||||
|
||||
/// The `Debug` output of the naive time `t` is same to
|
||||
/// [`t.format("%H:%M:%S%.f")`](../format/strftime/index.html).
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue