Closed
Description
clippy 0.0.212 (2855b21 2020-02-19)
Cargo.toml:
...
[dependencies]
crypto-hash = "0.3.1"
main.rs:
use self::crypto_hash::{Algorithm, Hasher};
use crypto_hash;
fn main() {}
This will cause a warning:
warning: this import is redundant
--> src/main.rs:2:1
|
2 | use crypto_hash;
| ^^^^^^^^^^^^^^^^ help: remove it entirely
|
= note: `#[warn(clippy::single_component_path_imports)]` on by default
but removing it will lead to a compiler error:
error[E0432]: unresolved import `self::crypto_hash`
--> src/main.rs:1:11
|
1 | use self::crypto_hash::{Algorithm, Hasher};
| ^^^^^^^^^^^ maybe a missing crate `crypto_hash`?
error: aborting due to previous error