Skip to content

Commit

Permalink
Fix clippy::needless_lifetimes warning
Browse files Browse the repository at this point in the history
```
error: the following explicit lifetimes could be elided: 'a
    --> src/lib.rs:1197:6
     |
1197 | impl<'a, T> EventListenerFuture for SendInner<'a, T> {
     |      ^^                                       ^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
     = note: `-D clippy::needless-lifetimes` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
     |
1197 - impl<'a, T> EventListenerFuture for SendInner<'a, T> {
1197 + impl<T> EventListenerFuture for SendInner<'_, T> {
     |

error: the following explicit lifetimes could be elided: 'a
    --> src/lib.rs:1253:6
     |
1253 | impl<'a, T> EventListenerFuture for RecvInner<'a, T> {
     |      ^^                                       ^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
     |
1253 - impl<'a, T> EventListenerFuture for RecvInner<'a, T> {
1253 + impl<T> EventListenerFuture for RecvInner<'_, T> {
     |
```
  • Loading branch information
taiki-e committed Jan 19, 2025
1 parent e4132e3 commit 3ce7937
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ pin_project! {
}
}

impl<'a, T> EventListenerFuture for SendInner<'a, T> {
impl<T> EventListenerFuture for SendInner<'_, T> {
type Output = Result<(), SendError<T>>;

/// Run this future with the given `Strategy`.
Expand Down Expand Up @@ -1250,7 +1250,7 @@ pin_project! {
}
}

impl<'a, T> EventListenerFuture for RecvInner<'a, T> {
impl<T> EventListenerFuture for RecvInner<'_, T> {
type Output = Result<T, RecvError>;

/// Run this future with the given `Strategy`.
Expand Down

0 comments on commit 3ce7937

Please sign in to comment.