File tree 2 files changed +8
-7
lines changed
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ create_config! {
92
92
the same line with the pattern of arms";
93
93
force_multiline_blocks: bool , false , false ,
94
94
"Force multiline closure bodies and match arms to be wrapped in a block" ;
95
- fn_args_layout: ItemsLayout , ItemsLayout :: Tall , true ,
95
+ fn_args_layout: Density , Density :: Tall , true ,
96
96
"Control the layout of arguments in a function" ;
97
97
brace_style: BraceStyle , BraceStyle :: SameLineWhere , false , "Brace style for items" ;
98
98
control_brace_style: ControlBraceStyle , ControlBraceStyle :: AlwaysSameLine , false ,
Original file line number Diff line number Diff line change @@ -58,7 +58,8 @@ pub enum IndentStyle {
58
58
59
59
#[ config_type]
60
60
/// How to place a list-like items.
61
- pub enum ItemsLayout {
61
+ /// FIXME: Issue-3581: this should be renamed to ItemsLayout when publishing 2.0
62
+ pub enum Density {
62
63
/// Fit as much on one line as possible.
63
64
Compressed ,
64
65
/// Items are placed horizontally if sufficient space, vertically otherwise.
@@ -87,13 +88,13 @@ pub enum Heuristics {
87
88
Default ,
88
89
}
89
90
90
- impl ItemsLayout {
91
+ impl Density {
91
92
pub fn to_list_tactic ( self , len : usize ) -> ListTactic {
92
93
match self {
93
- ItemsLayout :: Compressed => ListTactic :: Mixed ,
94
- ItemsLayout :: Tall => ListTactic :: HorizontalVertical ,
95
- ItemsLayout :: Vertical if len == 1 => ListTactic :: Horizontal ,
96
- ItemsLayout :: Vertical => ListTactic :: Vertical ,
94
+ Density :: Compressed => ListTactic :: Mixed ,
95
+ Density :: Tall => ListTactic :: HorizontalVertical ,
96
+ Density :: Vertical if len == 1 => ListTactic :: Horizontal ,
97
+ Density :: Vertical => ListTactic :: Vertical ,
97
98
}
98
99
}
99
100
}
You can’t perform that action at this time.
0 commit comments