Skip to content

Commit

Permalink
Merge pull request #661 from chronotope/cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
Milo123459 authored Mar 22, 2022
2 parents 9a5f76c + 6689881 commit d6d02ac
Show file tree
Hide file tree
Showing 35 changed files with 5,522 additions and 5,733 deletions.
1 change: 1 addition & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
msrv = "1.32"
6 changes: 3 additions & 3 deletions src/date.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl<Tz: TimeZone> Date<Tz> {
// note: this constructor is purposely not named to `new` to discourage the direct usage.
#[inline]
pub fn from_utc(date: NaiveDate, offset: Tz::Offset) -> Date<Tz> {
Date { date: date, offset: offset }
Date { date, offset }
}

/// Makes a new `DateTime` from the current date and given `NaiveTime`.
Expand Down Expand Up @@ -234,7 +234,7 @@ impl<Tz: TimeZone> Date<Tz> {
#[inline]
pub fn checked_add_signed(self, rhs: OldDuration) -> Option<Date<Tz>> {
let date = try_opt!(self.date.checked_add_signed(rhs));
Some(Date { date: date, offset: self.offset })
Some(Date { date, offset: self.offset })
}

/// Subtracts given `Duration` from the current date.
Expand All @@ -243,7 +243,7 @@ impl<Tz: TimeZone> Date<Tz> {
#[inline]
pub fn checked_sub_signed(self, rhs: OldDuration) -> Option<Date<Tz>> {
let date = try_opt!(self.date.checked_sub_signed(rhs));
Some(Date { date: date, offset: self.offset })
Some(Date { date, offset: self.offset })
}

/// Subtracts another `Date` from the current date.
Expand Down
Loading

0 comments on commit d6d02ac

Please sign in to comment.