We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52a29aa commit 99ea2cbCopy full SHA for 99ea2cb
exercises/options/options2.rs
@@ -13,7 +13,7 @@ mod tests {
13
let optional_target = Some(target);
14
15
// TODO: Make this an if let statement whose value is "Some" type
16
- if let Some(word) = optional_target {
+ word = optional_target {
17
assert_eq!(word, target);
18
}
19
@@ -28,7 +28,7 @@ mod tests {
28
29
// TODO: make this a while let statement - remember that vector.pop also adds another layer of Option<T>
30
// You can stack `Option<T>`'s into while let and if let
31
- while let Some(Some(integer)) = optional_integers.pop() {
+ integer = optional_integers.pop() {
32
assert_eq!(integer, range);
33
range -= 1;
34
0 commit comments