Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

armanriazi•rust•vec•some•pop


  // 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(value)) = optional_values_vec.pop() {
      println!("current value: {}", value);
  }
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
1+7 =