You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I first wrote this solution for the first part of option2 and it was marked as correct
fnmain(){let optional_value = Some(String::from("rustlings"));// TODO: Make this an if let statement whose value is "Some" typeiflet value = optional_value {println!("the value of optional value is: {}", value.unwrap());}else{println!("The optional value doesn't contain anything!");}// ....}
The code could be moved in a function and be tested with Some and None :
fnprint_value(optional_value:Option<String>){// TODO: Make this an if let statement whose value is "Some" type
value = optional_value{
println!("the value of optional value is: {}", value);}else{
println!("The optional value doesn't contain anything!");}}fnmain(){print_value(Some(String::from("rustlings")));print_value(None);// ....}
The text was updated successfully, but these errors were encountered:
Hello,
I first wrote this solution for the first part of option2 and it was marked as correct
The code could be moved in a function and be tested with Some and None :
The text was updated successfully, but these errors were encountered: