This commit is contained in:
Patrick Hintermayer 2021-07-07 08:01:51 -04:00 committed by GitHub
commit 95f0190dde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions
exercises/option

View file

@ -16,3 +16,5 @@ Option types are very common in Rust code, as they have a number of uses:
- [Option Enum Format](https://doc.rust-lang.org/stable/book/ch10-01-syntax.html#in-enum-definitions)
- [Option Module Documentation](https://doc.rust-lang.org/std/option/)
- [Option Enum Documentation](https://doc.rust-lang.org/std/option/enum.Option.html)
- [if let](https://doc.rust-lang.org/rust-by-example/flow_control/if_let.html)
- [while let](https://doc.rust-lang.org/rust-by-example/flow_control/while_let.html)

View file

@ -3,7 +3,7 @@
// I AM NOT DONE
// you can modify anything EXCEPT for this function's sig
// you can modify anything EXCEPT for this function's signature
fn print_number(maybe_number: Option<u16>) {
println!("printing: {}", maybe_number.unwrap());
}