1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-06-15 00:04:58 +02:00

option2 solution

This commit is contained in:
mo8it
2024-06-26 14:35:05 +02:00
parent c31e15c4cf
commit a91888e79e
3 changed files with 44 additions and 8 deletions

View File

@ -616,9 +616,9 @@ Check out:
- https://doc.rust-lang.org/rust-by-example/flow_control/if_let.html
- https://doc.rust-lang.org/rust-by-example/flow_control/while_let.html
Remember that `Option`s can be stacked in `if let` and `while let`.
Remember that `Option`s can be nested in if-let and while-let statements.
For example: `Some(Some(variable)) = variable2`
For example: `if let Some(Some(x)) = y`
Also see `Option::flatten`
"""