zesterer / ariadne

A fancy diagnostics & error reporting crate
https://crates.io/crates/ariadne
MIT License
1.61k stars 72 forks source link

Chore: `cargo clippy` and `cargo fmt` #110

Closed mohammadfawaz closed 2 months ago

mohammadfawaz commented 2 months ago

Runs cargo fmt and cargo clippy and fixes any issues that came up. It also adds those two steps to CI.

This is just a suggestion so feel free to close this PR. I just find it a good practice to make sure both tools are run with every PR to improve code quality.

zesterer commented 2 months ago

Thanks for the PR. I'll admit that I think that rustfmt has royally screwed up the legibility of the code (at least, what little legibility there was to begin with), but I guess that's an unfortunate compromise to have to make given that this crate is attracting more contributors and many folks have their editor autoformat everything by default.

Fwiw most of my time (or, at least, time that I dedicate to this crate's development) is going on the ariadne2 branch, which should hopefully get to the point where it can replace main soon.

zesterer commented 2 months ago

Looks like there's still a complaint from clippy.

mohammadfawaz commented 2 months ago

Thanks for the PR. I'll admit that I think that rustfmt has royally screwed up the legibility of the code (at least, what little legibility there was to begin with), but I guess that's an unfortunate compromise to have to make given that this crate is attracting more contributors and many folks have their editor autoformat everything by default.

Fwiw most of my time (or, at least, time that I dedicate to this crate's development) is going on the ariadne2 branch, which should hopefully get to the point where it can replace main soon.

Yeah, rustfmt can do that unfortunately. Looking forward to seeing the new branch merged!

Looks like there's still a complaint from clippy.

Yeah I just disabled that lint in the code. Fixing it was going to make the test quite unreadable.. Clippy suggested (1..0).rev() but that does not really work.

zesterer commented 2 months ago

Thanks for the PR!