Skip to content

Commit 36d1bd7

Browse files
authored
Merge pull request #2224 from kbacha/issue-2220
Combine 3 repeated sections into a single section
2 parents 632ea1a + 60e8af5 commit 36d1bd7

File tree

1 file changed

+13
-43
lines changed

1 file changed

+13
-43
lines changed

Configurations.md

Lines changed: 13 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,75 +1526,45 @@ let lorem = 0 .. 10;
15261526

15271527
## `spaces_within_parens_and_brackets`
15281528

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

15311531
- **Default value**: `false`
15321532
- **Possible values**: `true`, `false`
15331533

15341534
#### `false` (default):
15351535

15361536
```rust
1537+
// generic arguments
15371538
fn lorem<T: Eq>(t: T) {
15381539
// body
15391540
}
1540-
```
1541-
1542-
#### `true`:
1543-
1544-
```rust
1545-
fn lorem< T: Eq >(t: T) {
1546-
// body
1547-
}
1548-
```
1549-
1550-
See also: [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets), [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets).
1551-
1552-
## `spaces_within_parens_and_brackets`
1553-
1554-
Put spaces within non-empty parentheses
1555-
1556-
- **Default value**: `false`
1557-
- **Possible values**: `true`, `false`
15581541

1559-
#### `false` (default):
1560-
1561-
```rust
1542+
// non-empty parentheses
15621543
fn lorem<T: Eq>(t: T) {
15631544
let lorem = (ipsum, dolor);
15641545
}
1546+
1547+
// non-empty square brackets
1548+
let lorem: [usize; 2] = [ipsum, dolor];
15651549
```
15661550

15671551
#### `true`:
15681552

15691553
```rust
1554+
// generic arguments
1555+
fn lorem< T: Eq >(t: T) {
1556+
// body
1557+
}
1558+
1559+
// non-empty parentheses
15701560
fn lorem<T: Eq>( t: T ) {
15711561
let lorem = ( ipsum, dolor );
15721562
}
1573-
```
1574-
1575-
See also: [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets), [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets).
1576-
1577-
## `spaces_within_parens_and_brackets`
1578-
1579-
Put spaces within non-empty square brackets
1580-
1581-
- **Default value**: `false`
1582-
- **Possible values**: `true`, `false`
15831563

1584-
#### `false` (default):
1585-
1586-
```rust
1587-
let lorem: [usize; 2] = [ipsum, dolor];
1588-
```
1589-
1590-
#### `true`:
1591-
1592-
```rust
1564+
// non-empty square brackets
15931565
let lorem: [ usize; 2 ] = [ ipsum, dolor ];
15941566
```
15951567

1596-
See also: [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets), [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets).
1597-
15981568
## `struct_lit_single_line`
15991569

16001570
Put small struct literals on a single line

0 commit comments

Comments
 (0)