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

[*.rs] Sort imports ; [*test*.rs] Use assert_ne! throughout #1121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SamuelMarks
Copy link
Contributor

No description provided.

@@ -7,15 +7,17 @@
#[path = "diff_steps_test.rs"]
mod diff_steps_test;

use std::fs::File;
use std::io;
use std::io::{BufWriter, Write};
Copy link
Owner

Choose a reason for hiding this comment

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

why is this considered sorted?
i just put everything in a pile and let the formatter do it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. std libraries
  2. third-party libraries
  3. crate (first-party) libraries

Much more readable. I think I got the idea from isort. You can configure rustfmt to do this, see https://rust-lang.github.io/rustfmt/?version=v1.7.1&search=#StdExternalCrate%5C%3A

Copy link
Owner

Choose a reason for hiding this comment

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

ya i get that but i don't want to configure anything and stay consistent with other projects out there.
when ecosystem defaults change, i'll get those and fix as needed.
the assert_ne! parts are fine so suggest to have a PR just for that.

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