Skip to content

Commit

Permalink
fix(option2): Add TODO to comments (#400)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-cyprium authored May 16, 2020
1 parent 763aa6e commit 10967bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exercises/option/option2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

fn main() {
let optional_value = Some(String::from("rustlings"));
// Make this an if let statement whose value is "Some" type
// TODO: Make this an if let statement whose value is "Some" type
value = optional_value {
println!("the value of optional value is: {}", value);
} else {
Expand All @@ -17,7 +17,7 @@ fn main() {
optional_values_vec.push(Some(x));
}

// make this a while let statement - remember that vector.pop also adds another layer of Option<T>
// 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
value = optional_values_vec.pop() {
println!("current value: {}", value);
Expand Down

0 comments on commit 10967bc

Please sign in to comment.