13 lines
282 B
Rust
13 lines
282 B
Rust
|
fn main() {
|
||
|
let names = vec!["Bob", "Frank", "Ferris"];
|
||
|
|
||
|
for name in names.iter() {
|
||
|
match name {
|
||
|
&"Ferris" => println!("There is a rustacean among us!"),
|
||
|
_ => println!("Hello {}", name),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
println!("names: {:?}", names);
|
||
|
}
|