You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Cargo.lock file which has async-trait locked to version 0.1.31 but it's not committed. When I run clippy, I get no error. If I remove that lock file and run clippy again, cargo downloads 0.1.35 and I get an error about needless explicit lifetimes.
$ cargo clippy -- -D warnings
...
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> src/loader/awsec2metadata.rs:58:5
|
58 | async fn load(&self, key: &str) -> Result<String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::needless-lifetimes` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
...
If I change the method signature in the implementation to the following, the error goes away. From the README, it seems like this shouldn't be necessary?
I have a
Cargo.lock
file which hasasync-trait
locked to version0.1.31
but it's not committed. When I run clippy, I get no error. If I remove that lock file and run clippy again, cargo downloads0.1.35
and I get an error about needless explicit lifetimes.Trait
Implementation
Clippy error:
If I change the method signature in the implementation to the following, the error goes away. From the README, it seems like this shouldn't be necessary?
The text was updated successfully, but these errors were encountered: