Skip to content

Commit

Permalink
chore: make options2 not compile deliberately
Browse files Browse the repository at this point in the history
  • Loading branch information
magnusrodseth committed Aug 17, 2022
1 parent 52a29aa commit 99ea2cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exercises/options/options2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mod tests {
let optional_target = Some(target);

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

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

0 comments on commit 99ea2cb

Please sign in to comment.