box-o-sand/rustbyexample/flow_control.d/for4.rs
2023-09-26 11:03:55 -04:00

13 lines
288 B
Rust

fn main() {
let names = vec!["Bob", "Frank", "Ferris"];
for name in names.into_iter() {
match name {
"Ferris" => println!("There is a rustacean among us!"),
_ => println!("Hello {}", name),
}
}
//println!("names: {:?}", names);
}