Update Configurations.md

This commit is contained in:
topecongiro 2017-11-14 10:49:18 +09:00
parent f8074b340d
commit 707a296377

View File

@ -840,13 +840,15 @@ fn lorem
}
```
## `fn_brace_style`
## `brace_style`
Brace style for functions
Brace style for items
- **Default value**: `"SameLineWhere"`
- **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
### Functions
#### `"SameLineWhere"` (default):
```rust
@ -905,6 +907,50 @@ where
}
```
### Structs and enums
#### `"SameLineWhere"` (default):
```rust
struct Lorem {
ipsum: bool,
}
struct Dolor<T>
where T: Eq
{
sit: T,
}
```
#### `"AlwaysNextLine"`:
```rust
struct Lorem
{
ipsum: bool,
}
struct Dolor<T>
where T: Eq
{
sit: T,
}
```
#### `"PreferSameLine"`:
```rust
struct Lorem {
ipsum: bool,
}
struct Dolor<T>
where T: Eq {
sit: T,
}
```
## `fn_call_width`
Maximum width of the args of a function call before falling back to vertical formatting
@ -1125,7 +1171,7 @@ impl Lorem {
}
```
See also [`item_brace_style`](#item_brace_style).
See also [`brace_style`](#brace_style).
## `indent_match_arms`
@ -1239,55 +1285,6 @@ use foo::{aaa,
fff};
```
## `item_brace_style`
Brace style for structs and enums
- **Default value**: `"SameLineWhere"`
- **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
#### `"SameLineWhere"` (default):
```rust
struct Lorem {
ipsum: bool,
}
struct Dolor<T>
where T: Eq
{
sit: T,
}
```
#### `"AlwaysNextLine"`:
```rust
struct Lorem
{
ipsum: bool,
}
struct Dolor<T>
where T: Eq
{
sit: T,
}
```
#### `"PreferSameLine"`:
```rust
struct Lorem {
ipsum: bool,
}
struct Dolor<T>
where T: Eq {
sit: T,
}
```
## `match_arm_forces_newline`
Consistently put match arms (block based or not) in a newline.