-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add inner use sort to formatter. (#6467)
- Loading branch information
1 parent
0bc034b
commit 4f482d4
Showing
5 changed files
with
294 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
crates/cairo-lang-formatter/test_data/cairo_files/sort_inner_use.cairo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use std::collections::HashMap; | ||
use crate::utils::{a, b, d, c}; | ||
use b::{d, c, b, a}; | ||
use a::{d, b, a, c}; | ||
|
||
use a::{c, d}; | ||
use a::{d, b}; | ||
use aba; | ||
|
||
use a::{d, b as bee, b as aee, c as cee, a}; | ||
use a::{d, b}; | ||
use a::{a as bc, a as ab}; | ||
|
||
use a::{{d}, e, ab, c}; | ||
|
||
use a::{a, a::{c, {a}}, a::{b}, a::{{a},b}}; |
16 changes: 16 additions & 0 deletions
16
crates/cairo-lang-formatter/test_data/expected_results/sort_inner_use.cairo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use a::{a, b, c, d}; | ||
|
||
use a::{a, b as aee, b as bee, c as cee, d}; | ||
|
||
use a::{a, a::{b}, a::{c, {a}}, a::{b, {a}}}; | ||
use a::{a as ab, a as bc}; | ||
use a::{b, d}; | ||
use a::{b, d}; | ||
|
||
use a::{c, d}; | ||
|
||
use a::{ab, c, e, {d}}; | ||
use aba; | ||
use b::{a, b, c, d}; | ||
use crate::utils::{a, b, c, d}; | ||
use std::collections::HashMap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters