Skip to content

Commit 07c8e89

Browse files
committed
rename the fn_args_layout associated enum from Density to ItemsLayout
1 parent e305416 commit 07c8e89

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/config/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ create_config! {
9292
the same line with the pattern of arms";
9393
force_multiline_blocks: bool, false, false,
9494
"Force multiline closure bodies and match arms to be wrapped in a block";
95-
fn_args_layout: Density, Density::Tall, true, "Argument density in functions";
95+
fn_args_layout: ItemsLayout, ItemsLayout::Tall, true,
96+
"Control the layout of arguments in a function";
9697
brace_style: BraceStyle, BraceStyle::SameLineWhere, false, "Brace style for items";
9798
control_brace_style: ControlBraceStyle, ControlBraceStyle::AlwaysSameLine, false,
9899
"Brace style for control flow constructs";

src/config/options.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub enum IndentStyle {
5858

5959
#[config_type]
6060
/// How to place a list-like items.
61-
pub enum Density {
61+
pub enum ItemsLayout {
6262
/// Fit as much on one line as possible.
6363
Compressed,
6464
/// Items are placed horizontally if sufficient space, vertically otherwise.
@@ -87,13 +87,13 @@ pub enum Heuristics {
8787
Default,
8888
}
8989

90-
impl Density {
90+
impl ItemsLayout {
9191
pub fn to_list_tactic(self, len: usize) -> ListTactic {
9292
match self {
93-
Density::Compressed => ListTactic::Mixed,
94-
Density::Tall => ListTactic::HorizontalVertical,
95-
Density::Vertical if len == 1 => ListTactic::Horizontal,
96-
Density::Vertical => ListTactic::Vertical,
93+
ItemsLayout::Compressed => ListTactic::Mixed,
94+
ItemsLayout::Tall => ListTactic::HorizontalVertical,
95+
ItemsLayout::Vertical if len == 1 => ListTactic::Horizontal,
96+
ItemsLayout::Vertical => ListTactic::Vertical,
9797
}
9898
}
9999
}

0 commit comments

Comments
 (0)