gauteh / dars

𓃢 A fast and light OPeNDAP server
MIT License
20 stars 4 forks source link

run cargo clippy #2

Closed magnusuMET closed 4 years ago

magnusuMET commented 4 years ago

A lot of unneccessary strings are created when handling the errors, using the pattern

e.unwrap(anyhow!("{}", "x failed")

This will always evaluate the anyhow, even when not used. This is a lint in clippy, which also picks up some other "errors"

gauteh commented 4 years ago

Thanks for the suggestion, should definitely learn how to do this properly.

magnusuMET commented 4 years ago

clippy is available as rustup component add clippy, could also use rustup component add rustfmt and run cargo fmt

gauteh commented 4 years ago

Thanks, I did have it in there, but removed it since clippy was not available in nightly. rustmft should probably also be run.

(btw: maybe you have some thoughts on #3, but I'm pretty sure the error is not in netcdf)

magnusuMET commented 4 years ago

You'll have to run cargo fmt -- --check to emit build failure

gauteh commented 4 years ago

Criticals fixed, deal with rest as we go.