From 9e477e10f7c31ac4202c6c0ab89f3632a3d46155 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 7 Oct 2024 20:49:59 +0200 Subject: [PATCH] Ignore needless_lifetimes clippy lint warning: the following explicit lifetimes could be elided: 'a --> src/de.rs:392:11 | 392 | impl<'de, 'a> SeqAccess<'de> for DeserializerSeqVisitor<'a, 'de> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `-W clippy::needless-lifetimes` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::needless_lifetimes)]` help: elide the lifetimes | 392 - impl<'de, 'a> SeqAccess<'de> for DeserializerSeqVisitor<'a, 'de> { 392 + impl<'de> SeqAccess<'de> for DeserializerSeqVisitor<'_, 'de> { | warning: the following explicit lifetimes could be elided: 'a --> src/de.rs:419:11 | 419 | impl<'de, 'a> MapAccess<'de> for DeserializerMapVisitor<'a, 'de> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 419 - impl<'de, 'a> MapAccess<'de> for DeserializerMapVisitor<'a, 'de> { 419 + impl<'de> MapAccess<'de> for DeserializerMapVisitor<'_, 'de> { | warning: the following explicit lifetimes could be elided: 'a --> src/de.rs:451:11 | 451 | impl<'de, 'a> EnumAccess<'de> for DeserializerEnumVisitor<'a, 'de> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 451 - impl<'de, 'a> EnumAccess<'de> for DeserializerEnumVisitor<'a, 'de> { 451 + impl<'de> EnumAccess<'de> for DeserializerEnumVisitor<'_, 'de> { | warning: the following explicit lifetimes could be elided: 'a --> src/de.rs:476:11 | 476 | impl<'de, 'a> VariantAccess<'de> for DeserializerEnumVisitor<'a, 'de> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 476 - impl<'de, 'a> VariantAccess<'de> for DeserializerEnumVisitor<'a, 'de> { 476 + impl<'de> VariantAccess<'de> for DeserializerEnumVisitor<'_, 'de> { | warning: the following explicit lifetimes could be elided: 'a --> src/de.rs:592:11 | 592 | impl<'de, 'a> MapAccess<'de> for EnumMapVisitor<'a, 'de> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 592 - impl<'de, 'a> MapAccess<'de> for EnumMapVisitor<'a, 'de> { 592 + impl<'de> MapAccess<'de> for EnumMapVisitor<'_, 'de> { | warning: the following explicit lifetimes could be elided: 'a --> src/ser.rs:319:6 | 319 | impl<'a> ser::SerializeSeq for &mut Serializer<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 319 - impl<'a> ser::SerializeSeq for &mut Serializer<'a> { 319 + impl ser::SerializeSeq for &mut Serializer<'_> { | warning: the following explicit lifetimes could be elided: 'a --> src/ser.rs:336:6 | 336 | impl<'a> ser::SerializeTuple for &mut Serializer<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 336 - impl<'a> ser::SerializeTuple for &mut Serializer<'a> { 336 + impl ser::SerializeTuple for &mut Serializer<'_> { | warning: the following explicit lifetimes could be elided: 'a --> src/ser.rs:353:6 | 353 | impl<'a> ser::SerializeTupleStruct for &mut Serializer<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 353 - impl<'a> ser::SerializeTupleStruct for &mut Serializer<'a> { 353 + impl ser::SerializeTupleStruct for &mut Serializer<'_> { | warning: the following explicit lifetimes could be elided: 'a, 's --> src/ser.rs:370:6 | 370 | impl<'s, 'a> ser::SerializeTupleVariant for Variant<'s, 'a> { | ^^ ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 370 - impl<'s, 'a> ser::SerializeTupleVariant for Variant<'s, 'a> { 370 + impl ser::SerializeTupleVariant for Variant<'_, '_> { | warning: the following explicit lifetimes could be elided: 'a --> src/ser.rs:391:6 | 391 | impl<'a> ser::SerializeMap for &mut Serializer<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 391 - impl<'a> ser::SerializeMap for &mut Serializer<'a> { 391 + impl ser::SerializeMap for &mut Serializer<'_> { | warning: the following explicit lifetimes could be elided: 'a --> src/ser.rs:415:6 | 415 | impl<'a> ser::SerializeStruct for &mut Serializer<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 415 - impl<'a> ser::SerializeStruct for &mut Serializer<'a> { 415 + impl ser::SerializeStruct for &mut Serializer<'_> { | warning: the following explicit lifetimes could be elided: 'a, 's --> src/ser.rs:433:6 | 433 | impl<'s, 'a> ser::SerializeStructVariant for Variant<'s, 'a> { | ^^ ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 433 - impl<'s, 'a> ser::SerializeStructVariant for Variant<'s, 'a> { 433 + impl ser::SerializeStructVariant for Variant<'_, '_> { | --- src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index e935799..8b08c4a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -146,7 +146,11 @@ #![doc(html_root_url = "https://docs.rs/serde_test/1.0.177")] // Ignored clippy lints -#![allow(clippy::float_cmp, clippy::needless_doctest_main)] +#![allow( + clippy::float_cmp, + clippy::needless_doctest_main, + clippy::needless_lifetimes +)] // Ignored clippy_pedantic lints #![allow( clippy::manual_assert,