Fix needless_lifetimes in rustc_serialize
This commit is contained in:
parent
cf24c73141
commit
7ab466697f
@ -325,7 +325,7 @@ fn encode(&self, s: &mut S) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
where
|
||||||
[T]: ToOwned<Owned = Vec<T>>,
|
[T]: ToOwned<Owned = Vec<T>>,
|
||||||
{
|
{
|
||||||
@ -345,14 +345,14 @@ fn decode(d: &mut D) -> Cow<'static, [T]> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, S: Encoder> Encodable<S> for Cow<'a, str> {
|
impl<S: Encoder> Encodable<S> for Cow<'_, str> {
|
||||||
fn encode(&self, s: &mut S) {
|
fn encode(&self, s: &mut S) {
|
||||||
let val: &str = self;
|
let val: &str = self;
|
||||||
val.encode(s)
|
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> {
|
fn decode(d: &mut D) -> Cow<'static, str> {
|
||||||
let v: String = Decodable::decode(d);
|
let v: String = Decodable::decode(d);
|
||||||
Cow::Owned(v)
|
Cow::Owned(v)
|
||||||
|
Loading…
Reference in New Issue
Block a user