diff --git a/src/date.rs b/src/date.rs index 7acdde7..dba7dd0 100644 --- a/src/date.rs +++ b/src/date.rs @@ -224,6 +224,7 @@ impl Date { /// /// This does not overflow or underflow at all, /// as all possible output fits in the range of `Duration`. + #[cfg_attr(feature = "cargo-clippy", allow(needless_pass_by_value))] #[inline] pub fn signed_duration_since(self, rhs: Date) -> OldDuration { self.date.signed_duration_since(rhs.date) diff --git a/src/datetime.rs b/src/datetime.rs index f5ca30c..6500ee7 100644 --- a/src/datetime.rs +++ b/src/datetime.rs @@ -159,6 +159,7 @@ impl DateTime { /// Subtracts another `DateTime` from the current date and time. /// This does not overflow or underflow at all. + #[cfg_attr(feature = "cargo-clippy", allow(needless_pass_by_value))] #[inline] pub fn signed_duration_since(self, rhs: DateTime) -> OldDuration { self.datetime.signed_duration_since(rhs.datetime) diff --git a/src/lib.rs b/src/lib.rs index c20ff58..4e37d30 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -387,6 +387,12 @@ #![deny(missing_docs)] #![deny(missing_debug_implementations)] +// The explicit 'static lifetimes are still needed for rustc 1.13-16 +// backward compatibility, and this appeases clippy. If minimum rustc +// becomes 1.17, should be able to remove this, those 'static lifetimes, +// and use `static` in a lot of places `const` is used now. +#![cfg_attr(feature = "cargo-clippy", allow(const_static_lifetime))] + extern crate time as oldtime; extern crate num; #[cfg(feature = "rustc-serialize")]