mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-09-22 07:32:00 +00:00
962e21cf15
Add unit-hash lint
changelog: [`unit_hash`] Add lint for hashing unit values
This will lint for situations where the end user is attempting to hash a unit value (`()`), as the implementation in `std` simply [does nothing][impl]. Closes #7159 .
Example:
```rust
().hash(&mut state);
// Should (probably) be replaced with:
0_u8.hash(&mut state);
```
[impl]:
|
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |