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
  --> examples/with-metadata.rs:52:6
   |
52 | impl<'a, F: Future> Future for MeasureRuntime<'a, F> {
   |      ^^                                       ^^
   |
   = 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
   |
52 - impl<'a, F: Future> Future for MeasureRuntime<'a, F> {
52 + impl<F: Future> Future for MeasureRuntime<'_, F> {
   |
```
  • Loading branch information
taiki-e committed Jan 23, 2025
1 parent 419aa39 commit 3421b07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/with-metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pin_project! {
}
}

impl<'a, F: Future> Future for MeasureRuntime<'a, F> {
impl<F: Future> Future for MeasureRuntime<'_, F> {
type Output = F::Output;

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
Expand Down

0 comments on commit 3421b07

Please sign in to comment.