Skip to content

Commit

Permalink
Resolve redundant_static_lifetimes clippy lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jun 16, 2023
1 parent 6d0b43a commit 0993880
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions serde/src/de/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
//
Expand Down Expand Up @@ -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))
}
Expand Down Expand Up @@ -2642,7 +2642,7 @@ where
}
}

const VARIANTS: &'static [&'static str] = &["Ok", "Err"];
const VARIANTS: &[&str] = &["Ok", "Err"];

deserializer.deserialize_enum("Result", VARIANTS, ResultVisitor(PhantomData))
}
Expand Down
2 changes: 1 addition & 1 deletion serde/src/ser/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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\
Expand Down

0 comments on commit 0993880

Please sign in to comment.