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:
@ -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`
|
||||
"""
|
||||
|
Reference in New Issue
Block a user