You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently (version 0.6.2) rustfmt will change this:
use a;
use x;
use b;
use std::io;
to
use a;
use b;
use std::io;
use x;
By group i mean consecutive lines of imports. Groups are divided by empty newlines. I write my imports such that imports from the crate i'm working on are in one group and imports from other crates/std get put in different group. Rustfmt mixes them, which defeats the purpose of grouping. On the other hand i would like to have both groups sorted within themselves. Is there a way to achieve that with current version of rustfmt and if not could this be considered?
For the example above i'd like rustfmt to change it like so:
use a;
use b;
use x;
use std::io;
The text was updated successfully, but these errors were encountered:
Seconded. I also picked up that habit in the Python world and I currently keep my imports sorted manually because I value the groups more than the convenience of rustfmt.
Currently (version 0.6.2) rustfmt will change this:
to
By group i mean consecutive lines of imports. Groups are divided by empty newlines. I write my imports such that imports from the crate i'm working on are in one group and imports from other crates/
std
get put in different group. Rustfmt mixes them, which defeats the purpose of grouping. On the other hand i would like to have both groups sorted within themselves. Is there a way to achieve that with current version of rustfmt and if not could this be considered?For the example above i'd like rustfmt to change it like so:
The text was updated successfully, but these errors were encountered: