“Armanriazirustvecsomepop” Ответ

Armanriazirustvecsomepop


  // 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);
  }
ArmanRiazi

Armanriazirustvec

// <4> A "Vec" type is shorthand for vector. Vectors are arrays that will dynamically expand when needed.
// The underscore asks the the compiler to infer the type of the vector's elements.
        let fields: Vec<_> = record 
ArmanRiazi

Смотреть популярные ответы по языку

Смотреть другие языки программирования