8000 refactor: imports by Guelakais · Pull Request #600 · rust-bio/rust-bio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor: imports #600

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

Guelakais
Copy link

Imported dependencies must be formatted!

@Guelakais Guelakais changed the title autoformatting refactor imports Aug 5, 2024
@Guelakais Guelakais changed the title refactor imports refactor: imports Aug 5, 2024
GueLaKais added 2 commits August 5, 2024 11:00
Apparently, this code has been worked on for a very long time. This means that some things within the code are outdated. These things have been modernised.
Copy link
Contributor
@dcroote dcroote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a few cargo fmt lints to fix

@Guelakais
Copy link
Author

Why does the cargo fmt of your github ci show me different errors than when I run it locally? Normally such things should be handled by the .rustfmt.toml.

@fxwiegand
Copy link
Contributor

Why does the cargo fmt of your github ci show me different errors than when I run it locally? Normally such things should be handled by the .rustfmt.toml.

Have you considered upgrading your toolchain to the most recent version?

Copy link
Author
@Guelakais Guelakais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that good?

@Guelakais Guelakais requested a review from dcroote August 19, 2024 06:13
@dcroote
Copy link
Contributor
dcroote commented Aug 27, 2024

Getting to this now, sorry for the delay. Can I ask what you ran to format the imports?

@Guelakais
Copy link
Author
Guelakais commented Aug 27, 2024

Getting to this now, sorry for the delay. Can I ask what you ran to format the imports?

Therefore I add the following entry to .rustfmt.toml:

imports_granularity = "Crate"

this is a nightly feature, so I did not add it to the pull request.

@dcroote
Copy link
Contributor
dcroote commented Aug 27, 2024

this is a nightly feature, so I did not add it to the pull request.

Hmm. I see the following potential issue: if someone is working on stable and adds or changes an import, there isn't a guarantee that those changes will have a consistent style because 1) the .rustfmt.toml isn't in the repo and 2) it relies on nightly. Thoughts?

@Guelakais
Copy link
Author

I can also add the entry to .rustfmt.toml. The stable compiler simply ignores the entry. I can also add additional comments so that it is clear that you must first execute cargo +nightly fmt before a pull request.

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.

3 participants
0