From 4a384cae4ac735e243bbc58184b1f409e914ddc5 Mon Sep 17 00:00:00 2001 From: Zerotask Date: Sat, 24 Apr 2021 12:12:49 +0200 Subject: [PATCH] docs(option): improve further information --- exercises/option/README.md | 2 ++ exercises/option/option1.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/exercises/option/README.md b/exercises/option/README.md index a304bb44..89c00289 100644 --- a/exercises/option/README.md +++ b/exercises/option/README.md @@ -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) diff --git a/exercises/option/option1.rs b/exercises/option/option1.rs index 602ff1a9..17cf4f60 100644 --- a/exercises/option/option1.rs +++ b/exercises/option/option1.rs @@ -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) { println!("printing: {}", maybe_number.unwrap()); }