Skip to content

Combine 3 repeated sections into a single section #2224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 13 additions & 43 deletions Configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -1526,75 +1526,45 @@ let lorem = 0 .. 10;

## `spaces_within_parens_and_brackets`

Put spaces within non-empty generic arguments
Put spaces within non-empty generic arguments, parentheses, and square brackets

- **Default value**: `false`
- **Possible values**: `true`, `false`

#### `false` (default):

```rust
// generic arguments
fn lorem<T: Eq>(t: T) {
// body
}
```

#### `true`:

```rust
fn lorem< T: Eq >(t: T) {
// body
}
```

See also: [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets), [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets).

## `spaces_within_parens_and_brackets`

Put spaces within non-empty parentheses

- **Default value**: `false`
- **Possible values**: `true`, `false`

#### `false` (default):

```rust
// non-empty parentheses
fn lorem<T: Eq>(t: T) {
let lorem = (ipsum, dolor);
}

// non-empty square brackets
let lorem: [usize; 2] = [ipsum, dolor];
```

#### `true`:

```rust
// generic arguments
fn lorem< T: Eq >(t: T) {
// body
}

// non-empty parentheses
fn lorem<T: Eq>( t: T ) {
let lorem = ( ipsum, dolor );
}
```

See also: [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets), [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets).

## `spaces_within_parens_and_brackets`

Put spaces within non-empty square brackets

- **Default value**: `false`
- **Possible values**: `true`, `false`

#### `false` (default):

```rust
let lorem: [usize; 2] = [ipsum, dolor];
```

#### `true`:

```rust
// non-empty square brackets
let lorem: [ usize; 2 ] = [ ipsum, dolor ];
```

See also: [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets), [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets).

## `struct_lit_single_line`

Put small struct literals on a single line
Expand Down