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