Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0993880

Browse files
committed
Resolve redundant_static_lifetimes clippy lint
1 parent 6d0b43a commit 0993880

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

serde/src/de/impls.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,7 +2098,7 @@ impl<'de> Deserialize<'de> for Duration {
20982098
}
20992099
}
21002100

2101-
const FIELDS: &'static [&'static str] = &["secs", "nanos"];
2101+
const FIELDS: &[&str] = &["secs", "nanos"];
21022102
deserializer.deserialize_struct("Duration", FIELDS, DurationVisitor)
21032103
}
21042104
}
@@ -2240,7 +2240,7 @@ impl<'de> Deserialize<'de> for SystemTime {
22402240
}
22412241
}
22422242

2243-
const FIELDS: &'static [&'static str] = &["secs_since_epoch", "nanos_since_epoch"];
2243+
const FIELDS: &[&str] = &["secs_since_epoch", "nanos_since_epoch"];
22442244
let duration = try!(deserializer.deserialize_struct("SystemTime", FIELDS, DurationVisitor));
22452245
#[cfg(not(no_systemtime_checked_add))]
22462246
let ret = UNIX_EPOCH
@@ -2308,7 +2308,7 @@ mod range {
23082308

23092309
use de::{Deserialize, Deserializer, Error, MapAccess, SeqAccess, Visitor};
23102310

2311-
pub const FIELDS: &'static [&'static str] = &["start", "end"];
2311+
pub const FIELDS: &[&str] = &["start", "end"];
23122312

23132313
// If this were outside of the serde crate, it would just use:
23142314
//
@@ -2534,7 +2534,7 @@ where
25342534
}
25352535
}
25362536

2537-
const VARIANTS: &'static [&'static str] = &["Unbounded", "Included", "Excluded"];
2537+
const VARIANTS: &[&str] = &["Unbounded", "Included", "Excluded"];
25382538

25392539
deserializer.deserialize_enum("Bound", VARIANTS, BoundVisitor(PhantomData))
25402540
}
@@ -2642,7 +2642,7 @@ where
26422642
}
26432643
}
26442644

2645-
const VARIANTS: &'static [&'static str] = &["Ok", "Err"];
2645+
const VARIANTS: &[&str] = &["Ok", "Err"];
26462646

26472647
deserializer.deserialize_enum("Result", VARIANTS, ResultVisitor(PhantomData))
26482648
}

serde/src/ser/impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ impl Serialize for net::IpAddr {
713713
}
714714

715715
#[cfg(feature = "std")]
716-
const DEC_DIGITS_LUT: &'static [u8] = b"\
716+
const DEC_DIGITS_LUT: &[u8] = b"\
717717
0001020304050607080910111213141516171819\
718718
2021222324252627282930313233343536373839\
719719
4041424344454647484950515253545556575859\

0 commit comments

Comments
 (0)