@@ -8,15 +8,15 @@ pub fn plants(diagram: &str, name: &str) -> Vec<&'static str> {
88 let plant = get_plant ( encoding) ;
99 result. push ( plant. string ( ) ) ;
1010 }
11- } ;
11+ }
1212 result
1313}
1414
1515enum Plant {
1616 Grass ,
1717 Clover ,
1818 Radishes ,
19- Violets
19+ Violets ,
2020}
2121
2222impl Plant {
@@ -36,11 +36,10 @@ fn get_plant(encoding: char) -> Plant {
3636 'C' => Plant :: Clover ,
3737 'R' => Plant :: Radishes ,
3838 'V' => Plant :: Violets ,
39- _ => panic ! ( "Invalid plant encoding" )
40- }
39+ _ => panic ! ( "Invalid plant encoding" ) ,
40+ } ;
4141}
4242
43-
4443enum Student {
4544 Alice ,
4645 Bob ,
@@ -53,7 +52,7 @@ enum Student {
5352 Ileana ,
5453 Joseph ,
5554 Kincaid ,
56- Larry
55+ Larry ,
5756}
5857
5958fn parse_student ( name : & str ) -> Student {
@@ -70,8 +69,8 @@ fn parse_student(name: &str) -> Student {
7069 "Joseph" => Student :: Joseph ,
7170 "Kincaid" => Student :: Kincaid ,
7271 "Larry" => Student :: Larry ,
73- _ => panic ! ( "Invalid student name" )
74- }
72+ _ => panic ! ( "Invalid student name" ) ,
73+ } ;
7574}
7675
7776impl Student {
@@ -89,6 +88,6 @@ impl Student {
8988 Student :: Joseph => vec ! [ 18 , 19 ] ,
9089 Student :: Kincaid => vec ! [ 20 , 21 ] ,
9190 Student :: Larry => vec ! [ 22 , 23 ] ,
92- }
91+ } ;
9392 }
9493}
0 commit comments