From 7ab466697faf64aaeda40d6407c01f6bfff83fdb Mon Sep 17 00:00:00 2001 From: Michal Piotrowski Date: Tue, 8 Oct 2024 15:17:45 +0200 Subject: [PATCH] Fix needless_lifetimes in rustc_serialize --- compiler/rustc_serialize/src/serialize.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_serialize/src/serialize.rs b/compiler/rustc_serialize/src/serialize.rs index 2d37f5bdab800..bae5f259fccf4 100644 --- a/compiler/rustc_serialize/src/serialize.rs +++ b/compiler/rustc_serialize/src/serialize.rs @@ -325,7 +325,7 @@ impl Decodable for [u8; N] { } } -impl<'a, S: Encoder, T: Encodable> Encodable for Cow<'a, [T]> +impl> Encodable for Cow<'_, [T]> where [T]: ToOwned>, { @@ -345,14 +345,14 @@ where } } -impl<'a, S: Encoder> Encodable for Cow<'a, str> { +impl Encodable for Cow<'_, str> { fn encode(&self, s: &mut S) { let val: &str = self; val.encode(s) } } -impl<'a, D: Decoder> Decodable for Cow<'a, str> { +impl Decodable for Cow<'_, str> { fn decode(d: &mut D) -> Cow<'static, str> { let v: String = Decodable::decode(d); Cow::Owned(v)