1
0
Fork 0
mirror of https://github.com/ratfactor/ziglings synced 2024-06-01 23:06:03 +02:00

Merge pull request #112 from nahuakang/ex047-reference

Edit comment to specify `for reference`
This commit is contained in:
Dave Gauer 2022-07-31 16:24:48 -04:00 committed by GitHub
commit 93ecc1643e
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,7 +85,7 @@ pub fn main() void {
while (aliens_alive > 0) {
aliens_alive = 0;
// Loop through every alien...
// Loop through every alien by reference (* makes a pointer capture value)
for (aliens) |*alien| {
// *** Zap the alien with the heat ray here! ***