Skip to content

Commit

Permalink
Merge pull request #728 from Zerotask/improve-option-further-information
Browse files Browse the repository at this point in the history
docs(option): improve further information if let and while let
  • Loading branch information
shadows-withal authored Feb 4, 2022
2 parents 9c5d8ad + 4a384ca commit 9838892
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions exercises/option/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion exercises/option/option1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit 9838892

Please sign in to comment.