sharkdp / fd

A simple, fast and user-friendly alternative to 'find'
Apache License 2.0
33.61k stars 803 forks source link

Fix up some lints on Windows #1596

Closed RossSmyth closed 1 month ago

RossSmyth commented 2 months ago

Lints are not run for Windows in CI so they are missed. There are a couple that have been showing for a few months now so here are some fixes.

The reasoning behind the unused field is because of here: https://github.com/sharkdp/fd/blob/9f0fea6e21f5dfb192f456dd6fb1ff10cd1c1aa0/src/output.rs#L159-L167

Currently in CI you are only running Clippy for Linux. cargo clippy --all-targets does not lint for all target triples, but rather all compilation targets (binaries, libraries, tests, examples). So for each target you have cfg'd code, to lint that code you need to run Clippy on that target. Usually in the CI matrix in another step. Cross Clippy is theoretically possible but I've never gotten it to work reliably.

RossSmyth commented 2 months ago

oops had the wrong email on my commits