File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 66// I AM NOT DONE
77
88// This function returns how much icecream there is left in the fridge.
9- // If it's before 10PM, there's 5 pieces left. At 10PM, someone eats them
9+ // If it's before 10PM, there's 5 scoops left. At 10PM, someone eats it
1010// all, so there'll be no more left :(
1111fn maybe_icecream ( time_of_day : u16 ) -> Option < u16 > {
1212 // We use the 24-hour system here, so 10PM is a value of 22 and 12AM is a
13- // value of 0 The Option output should gracefully handle cases where
13+ // value of 0. The Option output should gracefully handle cases where
1414 // time_of_day > 23.
1515 // TODO: Complete the function body - remember to return an Option!
1616 ???
@@ -22,10 +22,11 @@ mod tests {
2222
2323 #[ test]
2424 fn check_icecream ( ) {
25+ assert_eq ! ( maybe_icecream( 0 ) , Some ( 5 ) ) ;
2526 assert_eq ! ( maybe_icecream( 9 ) , Some ( 5 ) ) ;
26- assert_eq ! ( maybe_icecream( 10 ) , Some ( 5 ) ) ;
27- assert_eq ! ( maybe_icecream( 23 ) , Some ( 0 ) ) ;
27+ assert_eq ! ( maybe_icecream( 18 ) , Some ( 5 ) ) ;
2828 assert_eq ! ( maybe_icecream( 22 ) , Some ( 0 ) ) ;
29+ assert_eq ! ( maybe_icecream( 23 ) , Some ( 0 ) ) ;
2930 assert_eq ! ( maybe_icecream( 25 ) , None ) ;
3031 }
3132
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ fn prompt_for_completion(
196196 if no_emoji {
197197 println ! ( "\n ~*~ {success_msg} ~*~\n " ) ;
198198 } else {
199- println ! ( "\n 🎉 🎉 {success_msg} 🎉 🎉\n " ) ;
199+ println ! ( "\n 🎉 🎉 {success_msg} 🎉 🎉\n " ) ;
200200 }
201201
202202 if let Some ( output) = prompt_output {
You can’t perform that action at this time.
0 commit comments