We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c69cf0 commit 2e59e4eCopy full SHA for 2e59e4e
src/imports.rs
@@ -708,7 +708,8 @@ impl Ord for UseTree {
708
}
709
710
711
- self.path.len().cmp(&other.path.len())
+ Ord::cmp(&self.path.len(), &other.path.len())
712
+ .then(Ord::cmp(&self.path.last(), &other.path.last()))
713
714
715
tests/target/imports-reorder-lines.rs
@@ -15,14 +15,14 @@ use aaa::*;
15
mod test {}
16
// If item names are equal, order by rename
17
18
-use test::{a as bb, b};
19
use test::{a as aa, c};
+use test::{a as bb, b};
20
21
22
// If item names are equal, order by rename - no rename comes before a rename
23
24
25
use test::{a, c};
26
27
28
// `self` always comes first
0 commit comments