Resolve redundant_static_lifetimes clippy lint from PR 2471
error: constants have by default a `'static` lifetime --> serde/src/de/impls.rs:2467:24 | 2467 | pub const FIELDS: &'static [&'static str] = &["end"]; | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes = note: `-D clippy::redundant-static-lifetimes` implied by `-D clippy::all` error: constants have by default a `'static` lifetime --> serde/src/de/impls.rs:2467:34 | 2467 | pub const FIELDS: &'static [&'static str] = &["end"]; | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes error: constants have by default a `'static` lifetime --> serde/src/de/impls.rs:2605:24 | 2605 | pub const FIELDS: &'static [&'static str] = &["start"]; | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes error: constants have by default a `'static` lifetime --> serde/src/de/impls.rs:2605:34 | 2605 | pub const FIELDS: &'static [&'static str] = &["start"]; | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
This commit is contained in:
parent
e6a4a3772e
commit
2de7c2bea2
@ -1450,7 +1450,7 @@ macro_rules! variant_identifier {
|
||||
$($variant),*
|
||||
}
|
||||
|
||||
static $variants_name: &'static [&'static str] = &[$(stringify!($variant)),*];
|
||||
static $variants_name: &[&str] = &[$(stringify!($variant)),*];
|
||||
|
||||
impl<'de> Deserialize<'de> for $name_kind {
|
||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||
@ -2464,7 +2464,7 @@ mod range_from {
|
||||
|
||||
use de::{Deserialize, Deserializer, Error, MapAccess, SeqAccess, Visitor};
|
||||
|
||||
pub const FIELDS: &'static [&'static str] = &["end"];
|
||||
pub const FIELDS: &[&str] = &["end"];
|
||||
|
||||
// If this were outside of the serde crate, it would just use:
|
||||
//
|
||||
@ -2602,7 +2602,7 @@ mod range_to {
|
||||
|
||||
use de::{Deserialize, Deserializer, Error, MapAccess, SeqAccess, Visitor};
|
||||
|
||||
pub const FIELDS: &'static [&'static str] = &["start"];
|
||||
pub const FIELDS: &[&str] = &["start"];
|
||||
|
||||
// If this were outside of the serde crate, it would just use:
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user