Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanups #661

Merged
merged 18 commits into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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