Merge pull request #206 from dekellum/clippy-allow-static-lifetime-for-now
Clippy allowances to get the build passing again
This commit is contained in:
commit
232a0f1255
|
@ -224,6 +224,7 @@ impl<Tz: TimeZone> Date<Tz> {
|
|||
///
|
||||
/// 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<Tz2: TimeZone>(self, rhs: Date<Tz2>) -> OldDuration {
|
||||
self.date.signed_duration_since(rhs.date)
|
||||
|
|
|
@ -159,6 +159,7 @@ impl<Tz: TimeZone> DateTime<Tz> {
|
|||
|
||||
/// 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<Tz2: TimeZone>(self, rhs: DateTime<Tz2>) -> OldDuration {
|
||||
self.datetime.signed_duration_since(rhs.datetime)
|
||||
|
|
|
@ -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")]
|
||||
|
|
Loading…
Reference in New Issue