mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-14 00:11:00 +00:00
Resolve some needless_lifetimes clippy lints
warning: the following explicit lifetimes could be elided: 'a
--> serde/src/de/mod.rs:489:6
|
489 | impl<'a> Expected for &'a str {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
489 - impl<'a> Expected for &'a str {
489 + impl Expected for &str {
|
warning: the following explicit lifetimes could be elided: 'a
--> serde/src/de/mod.rs:495:6
|
495 | impl<'a> Display for Expected + 'a {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
495 - impl<'a> Display for Expected + 'a {
495 + impl Display for Expected + '_ {
|
warning: the following explicit lifetimes could be elided: 'a
--> serde/src/de/mod.rs:1744:11
|
1744 | impl<'de, 'a, A> SeqAccess<'de> for &'a mut A
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1744 - impl<'de, 'a, A> SeqAccess<'de> for &'a mut A
1744 + impl<'de, A> SeqAccess<'de> for &mut A
|
warning: the following explicit lifetimes could be elided: 'a
--> serde/src/de/mod.rs:1897:11
|
1897 | impl<'de, 'a, A> MapAccess<'de> for &'a mut A
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1897 - impl<'de, 'a, A> MapAccess<'de> for &'a mut A
1897 + impl<'de, A> MapAccess<'de> for &mut A
|
warning: the following explicit lifetimes could be elided: 'a, 'b
--> serde/src/ser/fmt.rs:38:6
|
38 | impl<'a, 'b> Serializer for &'a mut fmt::Formatter<'b> {
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
38 - impl<'a, 'b> Serializer for &'a mut fmt::Formatter<'b> {
38 + impl Serializer for &mut fmt::Formatter<'_> {
|
warning: the following explicit lifetimes could be elided: 'a
--> serde_derive/src/internals/symbol.rs:49:6
|
49 | impl<'a> PartialEq<Symbol> for &'a Ident {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
49 - impl<'a> PartialEq<Symbol> for &'a Ident {
49 + impl PartialEq<Symbol> for &Ident {
|
warning: the following explicit lifetimes could be elided: 'a
--> serde_derive/src/internals/symbol.rs:61:6
|
61 | impl<'a> PartialEq<Symbol> for &'a Path {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
61 - impl<'a> PartialEq<Symbol> for &'a Path {
61 + impl PartialEq<Symbol> for &Path {
|
This commit is contained in:
+4
-4
@@ -486,13 +486,13 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Expected for &'a str {
|
impl Expected for &str {
|
||||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||||
formatter.write_str(self)
|
formatter.write_str(self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Display for Expected + 'a {
|
impl Display for Expected + '_ {
|
||||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||||
Expected::fmt(self, formatter)
|
Expected::fmt(self, formatter)
|
||||||
}
|
}
|
||||||
@@ -1741,7 +1741,7 @@ pub trait SeqAccess<'de> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'de, 'a, A> SeqAccess<'de> for &'a mut A
|
impl<'de, A> SeqAccess<'de> for &mut A
|
||||||
where
|
where
|
||||||
A: ?Sized + SeqAccess<'de>,
|
A: ?Sized + SeqAccess<'de>,
|
||||||
{
|
{
|
||||||
@@ -1894,7 +1894,7 @@ pub trait MapAccess<'de> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'de, 'a, A> MapAccess<'de> for &'a mut A
|
impl<'de, A> MapAccess<'de> for &mut A
|
||||||
where
|
where
|
||||||
A: ?Sized + MapAccess<'de>,
|
A: ?Sized + MapAccess<'de>,
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ macro_rules! fmt_primitives {
|
|||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
impl<'a, 'b> Serializer for &'a mut fmt::Formatter<'b> {
|
impl<'a> Serializer for &mut fmt::Formatter<'a> {
|
||||||
type Ok = ();
|
type Ok = ();
|
||||||
type Error = fmt::Error;
|
type Error = fmt::Error;
|
||||||
type SerializeSeq = Impossible<(), fmt::Error>;
|
type SerializeSeq = Impossible<(), fmt::Error>;
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ impl PartialEq<Symbol> for Ident {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> PartialEq<Symbol> for &'a Ident {
|
impl PartialEq<Symbol> for &Ident {
|
||||||
fn eq(&self, word: &Symbol) -> bool {
|
fn eq(&self, word: &Symbol) -> bool {
|
||||||
*self == word.0
|
*self == word.0
|
||||||
}
|
}
|
||||||
@@ -58,7 +58,7 @@ impl PartialEq<Symbol> for Path {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> PartialEq<Symbol> for &'a Path {
|
impl PartialEq<Symbol> for &Path {
|
||||||
fn eq(&self, word: &Symbol) -> bool {
|
fn eq(&self, word: &Symbol) -> bool {
|
||||||
self.is_ident(word.0)
|
self.is_ident(word.0)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user