mirror of
https://github.com/sunface/rust-by-practice.git
synced 2025-06-23 04:29:41 +00:00
Correct variable name inside for loop
This commit is contained in:
@ -72,7 +72,7 @@ fn main() {
|
|||||||
let numbers = [1, 2, 3];
|
let numbers = [1, 2, 3];
|
||||||
// The elements in numbers are Copy,so there is no move here
|
// The elements in numbers are Copy,so there is no move here
|
||||||
for n in numbers {
|
for n in numbers {
|
||||||
// Do something with name...
|
// Do something with n...
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("{:?}", numbers);
|
println!("{:?}", numbers);
|
||||||
|
Reference in New Issue
Block a user