@@ -984,8 +984,8 @@ fn first((value, _): (i32, i32)) -> i32 { value }
984984#### Generic functions
985985
986986A _ generic function_ allows one or more _ parameterized types_ to appear in its
987- signature. Each type parameter must be explicitly declared, in an
988- angle-bracket-enclosed, comma-separated list following the function name.
987+ signature. Each type parameter must be explicitly declared in an
988+ angle-bracket-enclosed and comma-separated list, following the function name.
989989
990990``` rust,ignore
991991// foo is generic over A and B
@@ -1179,7 +1179,7 @@ Enumeration constructors can have either named or unnamed fields:
11791179``` rust
11801180enum Animal {
11811181 Dog (String , f64 ),
1182- Cat { name : String , weight : f64 }
1182+ Cat { name : String , weight : f64 },
11831183}
11841184
11851185let mut a : Animal = Animal :: Dog (" Cocoa" . to_string (), 37.2 );
@@ -1237,12 +1237,12 @@ const STRING: &'static str = "bitstring";
12371237
12381238struct BitsNStrings<'a> {
12391239 mybits: [u32; 2],
1240- mystring: &'a str
1240+ mystring: &'a str,
12411241}
12421242
12431243const BITS_N_STRINGS: BitsNStrings<'static> = BitsNStrings {
12441244 mybits: BITS,
1245- mystring: STRING
1245+ mystring: STRING,
12461246};
12471247```
12481248
@@ -1661,7 +1661,7 @@ struct Foo;
16611661
16621662// Declare a public struct with a private field
16631663pub struct Bar {
1664- field: i32
1664+ field: i32,
16651665}
16661666
16671667// Declare a public enum with two public variants
@@ -3212,7 +3212,7 @@ may refer to the variables bound within the pattern they follow.
32123212let message = match maybe_digit {
32133213 Some(x) if x < 10 => process_digit(x),
32143214 Some(x) => process_other(x),
3215- None => panic!()
3215+ None => panic!(),
32163216};
32173217```
32183218
@@ -3504,7 +3504,7 @@ An example of a `fn` type:
35043504
35053505```
35063506fn add(x: i32, y: i32) -> i32 {
3507- return x + y;
3507+ x + y
35083508}
35093509
35103510let mut x = add(5,7);
0 commit comments