This commit is contained in:
Sanjay K 2020-04-02 08:41:14 -04:00
commit 05ca3d77f7
1 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@
// you can modify anything EXCEPT for this function's sig
fn print_number(maybe_number: Option<u16>) {
println!("printing: {}", *maybe_number);
println!("printing: {}", maybe_number.unwrap());
}
fn main() {
@ -15,7 +15,7 @@ fn main() {
let mut numbers: [Option<u16>; 5];
for iter in 0..5 {
let number_to_add: u16 = {
((iter * 5) + 2) / (4 * 16);
((iter * 5) + 2) / (4 * 16)
};
numbers[iter] = number_to_add;