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

Reorder import items of a use statement lexicographically. #797

Merged
merged 6 commits into from
Feb 16, 2022

Conversation

sagunb
Copy link
Contributor

@sagunb sagunb commented Feb 14, 2022

Fixes #777

@adlerjohn adlerjohn requested review from digorithm, JoshuaBatty and mitchmindtree and removed request for leviathanbeak February 14, 2022 21:38
@adlerjohn adlerjohn added enhancement New feature or request formatter labels Feb 14, 2022
@adlerjohn adlerjohn requested a review from sezna February 14, 2022 21:40
Copy link
Contributor

@sezna sezna left a comment

Choose a reason for hiding this comment

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

This is awesome, thanks for your contribution! I just left a few comments and questions.

sway-fmt/src/traversal_helper.rs Outdated Show resolved Hide resolved
sway-fmt/src/traversal_helper.rs Show resolved Hide resolved
sway-fmt/src/traversal_helper.rs Show resolved Hide resolved
@sagunb sagunb requested a review from sezna February 15, 2022 00:49
@leviathanbeak
Copy link
Contributor

looking good and thanks for the PR, but there is also this issue #776 would it be too much to ask to include this logic in here instead of removing the whitespace?

@otrho
Copy link
Contributor

otrho commented Feb 15, 2022

Using buffer.join(", ") instead of "," would probably work... removes unnecessary whitespace while putting the right amount back in?

@sagunb
Copy link
Contributor Author

sagunb commented Feb 15, 2022

Using buffer.join(", ") instead of "," would probably work... removes unnecessary whitespace while putting the right amount back in?

done.

@adlerjohn adlerjohn linked an issue Feb 15, 2022 that may be closed by this pull request
@leviathanbeak
Copy link
Contributor

nice, I guess now having a test case (something) like this

use std::hash::{HashMethod,    hash_value,               hash_pair    };

would be useful to confirm that it all works :)

@sagunb
Copy link
Contributor Author

sagunb commented Feb 15, 2022

nice, I guess now having a test case (something) like this

use std::hash::{HashMethod,    hash_value,               hash_pair    };

would be useful to confirm that it all works :)

Done.

@sezna sezna merged commit d4fa6de into FuelLabs:master Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request formatter
Projects
Archived in project
6 participants