Remove CompressedIfEmpty option from fn_args_density

It was identical to Tall
This commit is contained in:
Nick Cameron 2017-11-27 17:49:55 +13:00
parent 677446e99d
commit f0af1d4818
4 changed files with 2 additions and 89 deletions

View File

@ -636,7 +636,7 @@ See also [`comment_width`](#comment_width).
Argument density in functions
- **Default value**: `"Tall"`
- **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
- **Possible values**: `"Compressed"`, `"Tall"`, `"Vertical"`
#### `"Tall"` (default):
@ -696,35 +696,6 @@ trait Lorem {
}
```
#### `"CompressedIfEmpty"`:
```rust
trait Lorem {
fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
// body
}
fn lorem(
ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
adipiscing: Adipiscing, elit: Elit,
);
fn lorem(
ipsum: Ipsum,
dolor: Dolor,
sit: Sit,
amet: Amet,
consectetur: Consectetur,
adipiscing: Adipiscing,
elit: Elit,
) {
// body
}
}
```
#### `"Vertical"`:
```rust

View File

@ -77,8 +77,6 @@ configuration_option_enum! { Density:
Compressed,
// Use more lines.
Tall,
// Try to compress if the body is empty.
CompressedIfEmpty,
// Place every item on a separate line.
Vertical,
}
@ -95,7 +93,7 @@ impl Density {
pub fn to_list_tactic(self) -> ListTactic {
match self {
Density::Compressed => ListTactic::Mixed,
Density::Tall | Density::CompressedIfEmpty => ListTactic::HorizontalVertical,
Density::Tall => ListTactic::HorizontalVertical,
Density::Vertical => ListTactic::Vertical,
}
}

View File

@ -1,20 +0,0 @@
// rustfmt-fn_args_density: CompressedIfEmpty
// Function arguments density
trait Lorem {
fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
// body
}
fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: onsectetur, adipiscing: Adipiscing, elit: Elit);
// FIXME: Previous line should be formatted like this:
// fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: onsectetur,
// adipiscing: Adipiscing, elit: Elit);
fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: onsectetur, adipiscing: Adipiscing, elit: Elit) {
// body
}
}

View File

@ -1,36 +0,0 @@
// rustfmt-fn_args_density: CompressedIfEmpty
// Function arguments density
trait Lorem {
fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
// body
}
fn lorem(
ipsum: Ipsum,
dolor: Dolor,
sit: Sit,
amet: Amet,
consectetur: onsectetur,
adipiscing: Adipiscing,
elit: Elit,
);
// FIXME: Previous line should be formatted like this:
// fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: onsectetur,
// adipiscing: Adipiscing, elit: Elit);
fn lorem(
ipsum: Ipsum,
dolor: Dolor,
sit: Sit,
amet: Amet,
consectetur: onsectetur,
adipiscing: Adipiscing,
elit: Elit,
) {
// body
}
}