diff --git a/time/src/parsing/iso8601.rs b/time/src/parsing/iso8601.rs index 792c43280..048fc9584 100644 --- a/time/src/parsing/iso8601.rs +++ b/time/src/parsing/iso8601.rs @@ -19,6 +19,7 @@ impl Iso8601 { // Basic: [year]["W"][week][dayk] // Extended: [year]["-"]["W"][week]["-"][dayk] /// Parse a date in the basic or extended format. Reduced precision is permitted. + #[allow(clippy::needless_pass_by_ref_mut)] // rust-lang/rust-clippy#11620 pub(crate) fn parse_date<'a>( parsed: &'a mut Parsed, extended_kind: &'a mut ExtendedKind, diff --git a/time/src/time.rs b/time/src/time.rs index 97659e06b..90abc01fc 100644 --- a/time/src/time.rs +++ b/time/src/time.rs @@ -98,7 +98,7 @@ impl PartialEq for Time { impl PartialOrd for Time { fn partial_cmp(&self, other: &Self) -> Option { - self.as_u64().partial_cmp(&other.as_u64()) + Some(self.cmp(other)) } }