f321x / cashu-escrow-kit

Ecash escrow provider and client concept. Ecash hackathon project with @rodant.
MIT License
14 stars 3 forks source link

Add clippy formatting to vscode settings and run clippy #33

Closed f321x closed 2 months ago

f321x commented 2 months ago

Clippy can detect common mistakes in rust code and improve them automatically:

A collection of lints to catch common mistakes and improve your [Rust](https://github.com/rust-lang/rust) code.

[There are over 700 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)

Lints are divided into categories, each with a default [lint level](https://doc.rust-lang.org/rustc/lints/levels.html). You can choose how much Clippy is supposed to annoy help you by changing the lint level by category.

I added clippy to the vscode workspace settings so it runs cargo clippy instead of cargo check on saving, not only checking for bugs/invalid code but now also for other common mistakes. This improves the code quality and makes the code more uniform between different contributors.

Also ran the automatic clippy fix command which should in theory not impact the code functionality.