Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: cargo clippy and cargo fmt #110

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

mohammadfawaz
Copy link
Contributor

@mohammadfawaz mohammadfawaz commented Apr 8, 2024

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.

@mohammadfawaz mohammadfawaz changed the title cargo clippy and cargo fmt cargo clippy and cargo fmt Apr 8, 2024
@mohammadfawaz mohammadfawaz changed the title cargo clippy and cargo fmt Chore: cargo clippy and cargo fmt Apr 8, 2024
- Clippy and fmt in CI
src/write.rs Outdated Show resolved Hide resolved
src/write.rs Show resolved Hide resolved
src/source.rs Show resolved Hide resolved
@mohammadfawaz mohammadfawaz marked this pull request as ready for review April 8, 2024 15:35
@zesterer
Copy link
Owner

zesterer commented Apr 8, 2024

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
Copy link
Owner

zesterer commented Apr 8, 2024

Looks like there's still a complaint from clippy.

@mohammadfawaz
Copy link
Contributor Author

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 zesterer merged commit 6c9c6a7 into zesterer:main Apr 9, 2024
3 checks passed
@zesterer
Copy link
Owner

zesterer commented Apr 9, 2024

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants