]> git.lizzy.rs Git - rust.git/commitdiff
Combine 3 repeated sections into a single section
authorKevin Choubacha <kchoubacha@weedmaps.com>
Sat, 2 Dec 2017 23:23:07 +0000 (15:23 -0800)
committerKevin Choubacha <kchoubacha@weedmaps.com>
Sat, 2 Dec 2017 23:23:07 +0000 (15:23 -0800)
Configurations.md

index b02514c965b843f0d04cfe86fd2f4913a7a1f7dc..42bd66da3539bbb08d7297c1801951c8b88fa3b4 100644 (file)
@@ -1526,7 +1526,7 @@ 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`
@@ -1534,67 +1534,37 @@ Put spaces within non-empty generic arguments
 #### `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