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

Run cargo clippy --fix on codebase #236

Merged
merged 1 commit into from
Nov 8, 2023
Merged

Run cargo clippy --fix on codebase #236

merged 1 commit into from
Nov 8, 2023

Conversation

0xAdk
Copy link
Contributor

@0xAdk 0xAdk commented Nov 8, 2023

I noticed there was a lot of simple clippy lints that clippy --fix was able to resolve.

the lints it didn't have a fix for were:

Since I have a global ~/.config/rustfmt/rustfmt.toml I added the empty rustfmt.toml to override it.

@sharkdp
Copy link
Owner

sharkdp commented Nov 8, 2023

Thank you

Since I have a global ~/.config/rustfmt/rustfmt.toml I added the empty rustfmt.toml to override it.

Can we please remove it from this PR?

@0xAdk
Copy link
Contributor Author

0xAdk commented Nov 8, 2023

should I include it in another pr? or is there a reason to not have a rustfmt included with the project?

@sharkdp
Copy link
Owner

sharkdp commented Nov 8, 2023

Thank you for the update

Is it a recommended practice to put an empty rustfmt.toml file? I don't have that in any of my projects, and it has worked well so far.

(personally, I'd rather question the practice of having a global — instead of project-centric — rustfmt config)

@sharkdp sharkdp merged commit 416586c into sharkdp:master Nov 8, 2023
@0xAdk
Copy link
Contributor Author

0xAdk commented Nov 8, 2023

I don't think it's recommended anywhere, but it fixed the issue.

personally, I'd rather question the practice of having a global — instead of project-centric — rustfmt config

that's fair... I had it for all the small projects I created but at some point I just defaulted to setting up rust projects with cargo init; cp ~/.config/rustfmt/rustfmt.toml ./rustfmt.toml; cargo fmt, so I can probably just mv the rustfmt.toml file somewhere else and not have it act globally.

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