Content deleted Content added
→Rust: removed "use" statement to be consistent with other languages. Corrected wording. |
→Rust: Added looping through only keys |
||
Line 1,680:
</syntaxhighlight>
<syntaxhighlight lang="text">
for name in phone_book.keys() {
println!("{}", name);
}
</syntaxhighlight>
To loop hrough all entries as tuples:
<syntaxhighlight lang="text">
for (name, number) in &phone_book {
|