mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Fix needless_lifetimes in rustc_serialize
This commit is contained in:
parent
cf24c73141
commit
7ab466697f
@ -325,7 +325,7 @@ impl<D: Decoder, const N: usize> Decodable<D> for [u8; N] {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, S: Encoder, T: Encodable<S>> Encodable<S> for Cow<'a, [T]>
|
||||
impl<S: Encoder, T: Encodable<S>> Encodable<S> for Cow<'_, [T]>
|
||||
where
|
||||
[T]: ToOwned<Owned = Vec<T>>,
|
||||
{
|
||||
@ -345,14 +345,14 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, S: Encoder> Encodable<S> for Cow<'a, str> {
|
||||
impl<S: Encoder> Encodable<S> for Cow<'_, str> {
|
||||
fn encode(&self, s: &mut S) {
|
||||
let val: &str = self;
|
||||
val.encode(s)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, D: Decoder> Decodable<D> for Cow<'a, str> {
|
||||
impl<D: Decoder> Decodable<D> for Cow<'_, str> {
|
||||
fn decode(d: &mut D) -> Cow<'static, str> {
|
||||
let v: String = Decodable::decode(d);
|
||||
Cow::Owned(v)
|
||||
|
Loading…
Reference in New Issue
Block a user