Skip to content

Commit 4dfc6e7

Browse files
committed
Resolve some needless_lifetimes clippy lints
warning: the following explicit lifetimes could be elided: 'a --> src/bytes.rs:106:6 | 106 | impl<'a> Default for &'a Bytes { | ^^ ^^ | = 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 | 106 - impl<'a> Default for &'a Bytes { 106 + impl Default for &Bytes { | warning: the following explicit lifetimes could be elided: 'a --> src/ser.rs:102:6 | 102 | impl<'a, T> Serialize for &'a T | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 102 - impl<'a, T> Serialize for &'a T 102 + impl<T> Serialize for &T |
1 parent 527f91a commit 4dfc6e7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/bytes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl From<Box<[u8]>> for Box<Bytes> {
103103
}
104104
}
105105

106-
impl<'a> Default for &'a Bytes {
106+
impl Default for &Bytes {
107107
fn default() -> Self {
108108
Bytes::new(&[])
109109
}

src/ser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl<'a> Serialize for Cow<'a, Bytes> {
9999
}
100100
}
101101

102-
impl<'a, T> Serialize for &'a T
102+
impl<T> Serialize for &T
103103
where
104104
T: ?Sized + Serialize,
105105
{

0 commit comments

Comments
 (0)