Skip to content

Comments

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

Open
SamuelMarks wants to merge 1 commit intosagiegurari:masterfrom
offscale:test-improvements
Open

[*.rs] Sort imports ; [*test*.rs] Use assert_ne! throughout#1121
SamuelMarks wants to merge 1 commit intosagiegurari:masterfrom
offscale:test-improvements

Conversation

@SamuelMarks
Copy link
Contributor

No description provided.


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