Skip to content

Commit

Permalink
Fix clippy needless_lifetimes lint (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
FreezyLemon authored Dec 5, 2024
1 parent 5362c9e commit aa81e80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/codec/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub trait Decoder<T> {
fn decoder(self) -> Option<Codec<T>>;
}

impl<'a> Decoder<UnknownType> for &'a str {
impl Decoder<UnknownType> for &str {
fn decoder(self) -> Option<Codec<UnknownType>> {
decoder::find_by_name(self)
}
Expand Down Expand Up @@ -39,7 +39,7 @@ pub trait Encoder<T> {
fn encoder(self) -> Option<Codec<T>>;
}

impl<'a> Encoder<UnknownType> for &'a str {
impl Encoder<UnknownType> for &str {
fn encoder(self) -> Option<Codec<UnknownType>> {
encoder::find_by_name(self)
}
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#![allow(clippy::too_many_arguments)]
// FFI Types may differ across platforms, making casts necessary
#![allow(clippy::unnecessary_cast)]
// This lint sometimes suggests worse code. See rust-lang/rust-clippy#13514
#![allow(clippy::needless_lifetimes)]

#[macro_use]
extern crate bitflags;
Expand Down

0 comments on commit aa81e80

Please sign in to comment.