Skip to content

Commit aa81e80

Browse files
authored
Fix clippy needless_lifetimes lint (shssoichiro#89)
1 parent 5362c9e commit aa81e80

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/codec/traits.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pub trait Decoder<T> {
77
fn decoder(self) -> Option<Codec<T>>;
88
}
99

10-
impl<'a> Decoder<UnknownType> for &'a str {
10+
impl Decoder<UnknownType> for &str {
1111
fn decoder(self) -> Option<Codec<UnknownType>> {
1212
decoder::find_by_name(self)
1313
}
@@ -39,7 +39,7 @@ pub trait Encoder<T> {
3939
fn encoder(self) -> Option<Codec<T>>;
4040
}
4141

42-
impl<'a> Encoder<UnknownType> for &'a str {
42+
impl Encoder<UnknownType> for &str {
4343
fn encoder(self) -> Option<Codec<UnknownType>> {
4444
encoder::find_by_name(self)
4545
}

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#![allow(clippy::too_many_arguments)]
55
// FFI Types may differ across platforms, making casts necessary
66
#![allow(clippy::unnecessary_cast)]
7+
// This lint sometimes suggests worse code. See rust-lang/rust-clippy#13514
8+
#![allow(clippy::needless_lifetimes)]
79

810
#[macro_use]
911
extern crate bitflags;

0 commit comments

Comments
 (0)