Argument density in functions
- **Default value**: `"Tall"`
-- **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
+- **Possible values**: `"Compressed"`, `"Tall"`, `"Vertical"`
#### `"Tall"` (default):
}
```
-#### `"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
```
+## `empty_item_single_line`
-## `fn_empty_single_line`
-
-Put empty-body functions on a single line
+Put empty-body functions and impls on a single line
- **Default value**: `true`
- **Possible values**: `true`, `false`
```rust
fn lorem() {}
+
+impl Lorem {}
```
#### `false`:
```rust
fn lorem() {
}
+
+impl Lorem {
+}
```
-See also [`control_brace_style`](#control_brace_style).
+See also [`brace_style`](#brace_style), [`control_brace_style`](#control_brace_style).
## `fn_single_line`
See also: [`tab_spaces`](#tab_spaces).
-## `impl_empty_single_line`
-
-Put empty-body implementations on a single line
-
-- **Default value**: `true`
-- **Possible values**: `true`, `false`
-
-#### `true` (default):
-
-```rust
-impl Lorem {}
-```
-
-#### `false`:
-
-```rust
-impl Lorem {
-}
-```
-
-See also [`brace_style`](#brace_style).
-
## `imports_indent`
fff};
```
-## `match_arm_forces_newline`
-
-Consistently put match arms (block based or not) in a newline.
-
-- **Default value**: `false`
-- **Possible values**: `true`, `false`
-
-#### `false` (default):
-
-```rust
-match x {
- // a non-empty block
- X0 => {
- f();
- }
- // an empty block
- X1 => {}
- // a non-block
- X2 => println!("ok"),
-}
-```
-
-#### `true`:
-
-```rust
-match x {
- // a non-empty block
- X0 => {
- f();
- }
- // an empty block
- X1 =>
- {}
- // a non-block
- X2 => {
- println!("ok")
- }
-}
-```
-
-See also: [`wrap_match_arms`](#wrap_match_arms).
## `match_block_trailing_comma`
}
```
-See also: [`trailing_comma`](#trailing_comma), [`wrap_match_arms`](#wrap_match_arms).
+See also: [`trailing_comma`](#trailing_comma), [`match_arm_blocks`](#match_arm_blocks).
## `max_width`
pub enum Foo {}
```
-## `multiline_closure_forces_block`
+## `force_multiline_blocks`
-Force multiline closure bodies to be wrapped in a block
+Force multiline closure and match arm bodies to be wrapped in a block
- **Default value**: `false`
- **Possible values**: `false`, `true`
None => ...,
Some(value) => ...,
})
+
+match lorem {
+ None => if ipsum {
+ println!("Hello World");
+ },
+ Some(dolor) => ...,
+}
```
#### `true`:
Some(value) => ...,
}
})
-```
-
-## `multiline_match_arm_forces_block`
-
-Force multiline match arm bodies to be wrapped in a block
-- **Default value**: `false`
-- **Possible values**: `false`, `true`
-
-#### `false` (default):
-
-```rust
-match lorem {
- None => if ipsum {
- println!("Hello World");
- },
- Some(dolor) => ...,
-}
-```
-
-#### `true`:
-
-```rust
match lorem {
None => {
if ipsum {
}
```
+
## `newline_style`
Unix or Windows line endings
// commodo consequat.
```
-## `wrap_match_arms`
+## `match_arm_blocks`
Wrap the body of arms in blocks when it does not fit on the same line with the pattern of arms