bb8
bb8 copied to clipboard
Some minor lints
- use
#[must_use]
for Self-returning fn - some minor docs for panics
- use
Self
instead of a specific type in some cases
I used this command to test:
❯ cargo clippy -- -W clippy::default_trait_access -W clippy::missing_panics_doc -W clippy::return-self-not-must-use -W clippy::semicolon-if-nothing-returned -W clippy::trait-duplication-in-bounds
There is only one issue remaining that I'm not certain how to fix (or if its even needed to be fixed?):
warning: this trait bound is already specified in the where clause
--> postgres/src/lib.rs:52:46
|
52 | <Tls as MakeTlsConnect<Socket>>::Stream: Send + Sync,
| ^^^^
|
= note: requested on the command line with `-W clippy::trait-duplication-in-bounds`
= help: consider removing this trait bound
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trait_duplication_in_bounds
See #131 . I tried to add a clippy.toml file to make this more consistent, but that seems not to work properly -- https://github.com/rust-lang/rust-clippy/issues/9265
Looks to me like the trait-duplication-in-bounds issue is a clippy false positive, might be worth filing an issue about that.
thx, fixed