File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1179,7 +1179,7 @@ Enumeration constructors can have either named or unnamed fields:
1179
1179
``` rust
1180
1180
enum Animal {
1181
1181
Dog (String , f64 ),
1182
- Cat { name : String , weight : f64 }
1182
+ Cat { name : String , weight : f64 },
1183
1183
}
1184
1184
1185
1185
let mut a : Animal = Animal :: Dog (" Cocoa" . to_string (), 37.2 );
@@ -1237,12 +1237,12 @@ const STRING: &'static str = "bitstring";
1237
1237
1238
1238
struct BitsNStrings<'a> {
1239
1239
mybits: [u32; 2],
1240
- mystring: &'a str
1240
+ mystring: &'a str,
1241
1241
}
1242
1242
1243
1243
const BITS_N_STRINGS: BitsNStrings<'static> = BitsNStrings {
1244
1244
mybits: BITS,
1245
- mystring: STRING
1245
+ mystring: STRING,
1246
1246
};
1247
1247
```
1248
1248
@@ -1661,7 +1661,7 @@ struct Foo;
1661
1661
1662
1662
// Declare a public struct with a private field
1663
1663
pub struct Bar {
1664
- field: i32
1664
+ field: i32,
1665
1665
}
1666
1666
1667
1667
// Declare a public enum with two public variants
@@ -3212,7 +3212,7 @@ may refer to the variables bound within the pattern they follow.
3212
3212
let message = match maybe_digit {
3213
3213
Some(x) if x < 10 => process_digit(x),
3214
3214
Some(x) => process_other(x),
3215
- None => panic!()
3215
+ None => panic!(),
3216
3216
};
3217
3217
```
3218
3218
You can’t perform that action at this time.
0 commit comments