> Check `implicit_clone` section of Clippy documentation for details;
>
> https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone
This adds, and addresses, the following Clippy configuration to crates;
#![deny(clippy::implicit_clone)]
And moves related line within `maint/add_warning.py` file. My intent is to
mitigate extra edits after merging, so please let me know if I need to do this
last bit differently.
> Check `missing_panics_doc` section of Clippy documentation for details;
>
> https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
This adds the following Clippy configuration to crates;
#![deny(clippy::missing_panics_doc)]
And adds necessary doc-comments to methods that may panic.
> Check `cast_lossless` section of Clippy documentation for details;
>
> https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
This adds the following Clippy configuration to crates;
#![deny(clippy::cast_lossless)]
And applies suggested Clippy and `cargo fmt` fixes.
This is a somewhat obnoxious change in its scope and requirements,
but it makes it easier to understand what the real public and
private parts of our APIs are.
Rust 1.52 just came out, and there are new clippy lints to deal
with:
* It spots more cases when we could use Option::map
* It spots more cases when we could use Iterator::flatten
* When we build a struct instance, it wants us to list the fields
in the same order that the struct declares them.
These lints force us to declare our exported enums and
exhaustive-looking structs as non-exhaustive (so that we can add to
them in the future without breaking our API) or to explicitly
disable the warning for a given enum/struct (to say that we _intend_
for additions to be a breaking change).
This affects the cache_dir and the as-yet-unused state_dir. It uses
the shellexpand and directories crates so that the default values
can be constant strings that use variables to refer to the right
default locations.