Skip to content

Commit 99ea2cb

Browse files
committed
chore: make options2 not compile deliberately
1 parent 52a29aa commit 99ea2cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/options/options2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ mod tests {
1313
let optional_target = Some(target);
1414

1515
// TODO: Make this an if let statement whose value is "Some" type
16-
if let Some(word) = optional_target {
16+
word = optional_target {
1717
assert_eq!(word, target);
1818
}
1919
}
@@ -28,7 +28,7 @@ mod tests {
2828

2929
// TODO: make this a while let statement - remember that vector.pop also adds another layer of Option<T>
3030
// You can stack `Option<T>`'s into while let and if let
31-
while let Some(Some(integer)) = optional_integers.pop() {
31+
integer = optional_integers.pop() {
3232
assert_eq!(integer, range);
3333
range -= 1;
3434
}

0 commit comments

Comments
 (0)