-
Notifications
You must be signed in to change notification settings - Fork 897
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
short_item_threshold
config option
Allow custom short item threshold values via config
- Loading branch information
Showing
9 changed files
with
103 additions
and
5 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// rustfmt-short_item_threshold: 10 | ||
|
||
fn main() { | ||
pub const FORMAT_TEST: [u64; 5] = [ | ||
0x0000000000000000, | ||
0xaaaaaaaaaaaaaaaa, | ||
0xbbbbbbbbbbbbbbbb, | ||
0xcccccccccccccccc, | ||
0xdddddddddddddddd, | ||
]; | ||
} |
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,11 @@ | ||
// rustfmt-short_item_threshold: 20 | ||
|
||
fn main() { | ||
pub const FORMAT_TEST: [u64; 5] = [ | ||
0x0000000000000000, | ||
0xaaaaaaaaaaaaaaaa, | ||
0xbbbbbbbbbbbbbbbb, | ||
0xcccccccccccccccc, | ||
0xdddddddddddddddd, | ||
]; | ||
} |
12 changes: 12 additions & 0 deletions
12
tests/source/configs/short_item_threshold/greater_than_max_width.rs
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,12 @@ | ||
// rustfmt-max_width: 20 | ||
// rustfmt-short_item_threshold: 30 | ||
|
||
fn main() { | ||
pub const FORMAT_TEST: [u64; 5] = [ | ||
0x0000000000000000, | ||
0xaaaaaaaaaaaaaaaa, | ||
0xbbbbbbbbbbbbbbbb, | ||
0xcccccccccccccccc, | ||
0xdddddddddddddddd, | ||
]; | ||
} |
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,11 @@ | ||
// rustfmt-short_item_threshold: 10 | ||
|
||
fn main() { | ||
pub const FORMAT_TEST: [u64; 5] = [ | ||
0x0000000000000000, | ||
0xaaaaaaaaaaaaaaaa, | ||
0xbbbbbbbbbbbbbbbb, | ||
0xcccccccccccccccc, | ||
0xdddddddddddddddd, | ||
]; | ||
} |
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,8 @@ | ||
// rustfmt-short_item_threshold: 20 | ||
|
||
fn main() { | ||
pub const FORMAT_TEST: [u64; 5] = [ | ||
0x0000000000000000, 0xaaaaaaaaaaaaaaaa, 0xbbbbbbbbbbbbbbbb, 0xcccccccccccccccc, | ||
0xdddddddddddddddd, | ||
]; | ||
} |
12 changes: 12 additions & 0 deletions
12
tests/target/configs/short_item_threshold/greater_than_max_width.rs
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,12 @@ | ||
// rustfmt-max_width: 20 | ||
// rustfmt-short_item_threshold: 30 | ||
|
||
fn main() { | ||
pub const FORMAT_TEST: [u64; 5] = [ | ||
0x0000000000000000, | ||
0xaaaaaaaaaaaaaaaa, | ||
0xbbbbbbbbbbbbbbbb, | ||
0xcccccccccccccccc, | ||
0xdddddddddddddddd, | ||
]; | ||
} |