Advertisement
cwchen

[Rust] Iterate an array (with error)

Aug 22nd, 2017
742
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.16 KB | None | 0 0
  1. fn main() {
  2.     let array = ["eins", "zwei", "drei", "vier", "fünf"];
  3.  
  4.     // Error
  5.     for element in array {
  6.         println!("{}", element);
  7.     }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement