From 09938803af27e1da69435459b99a5bbf0e883b52 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 15 Jun 2023 18:29:09 -0700 Subject: [PATCH] Resolve redundant_static_lifetimes clippy lint --- serde/src/de/impls.rs | 10 +++++----- serde/src/ser/impls.rs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/serde/src/de/impls.rs b/serde/src/de/impls.rs index f1326e11c..54a919a5a 100644 --- a/serde/src/de/impls.rs +++ b/serde/src/de/impls.rs @@ -2098,7 +2098,7 @@ impl<'de> Deserialize<'de> for Duration { } } - const FIELDS: &'static [&'static str] = &["secs", "nanos"]; + const FIELDS: &[&str] = &["secs", "nanos"]; deserializer.deserialize_struct("Duration", FIELDS, DurationVisitor) } } @@ -2240,7 +2240,7 @@ impl<'de> Deserialize<'de> for SystemTime { } } - const FIELDS: &'static [&'static str] = &["secs_since_epoch", "nanos_since_epoch"]; + const FIELDS: &[&str] = &["secs_since_epoch", "nanos_since_epoch"]; let duration = try!(deserializer.deserialize_struct("SystemTime", FIELDS, DurationVisitor)); #[cfg(not(no_systemtime_checked_add))] let ret = UNIX_EPOCH @@ -2308,7 +2308,7 @@ mod range { use de::{Deserialize, Deserializer, Error, MapAccess, SeqAccess, Visitor}; - pub const FIELDS: &'static [&'static str] = &["start", "end"]; + pub const FIELDS: &[&str] = &["start", "end"]; // If this were outside of the serde crate, it would just use: // @@ -2534,7 +2534,7 @@ where } } - const VARIANTS: &'static [&'static str] = &["Unbounded", "Included", "Excluded"]; + const VARIANTS: &[&str] = &["Unbounded", "Included", "Excluded"]; deserializer.deserialize_enum("Bound", VARIANTS, BoundVisitor(PhantomData)) } @@ -2642,7 +2642,7 @@ where } } - const VARIANTS: &'static [&'static str] = &["Ok", "Err"]; + const VARIANTS: &[&str] = &["Ok", "Err"]; deserializer.deserialize_enum("Result", VARIANTS, ResultVisitor(PhantomData)) } diff --git a/serde/src/ser/impls.rs b/serde/src/ser/impls.rs index a79326e5c..9e1bff793 100644 --- a/serde/src/ser/impls.rs +++ b/serde/src/ser/impls.rs @@ -713,7 +713,7 @@ impl Serialize for net::IpAddr { } #[cfg(feature = "std")] -const DEC_DIGITS_LUT: &'static [u8] = b"\ +const DEC_DIGITS_LUT: &[u8] = b"\ 0001020304050607080910111213141516171819\ 2021222324252627282930313233343536373839\ 4041424344454647484950515253545556575859\