From 40b9a1fc2c6187008374de16f65ab3fe02e9f8c5 Mon Sep 17 00:00:00 2001 From: Danny Yoo Date: Wed, 23 Aug 2023 07:10:24 -0700 Subject: [PATCH] Update for-loops.md to remove misleading sentence (#1094) Drops the comment about usage in the other loop. It's not related to the focus on copy semantics, and so we want to eliminate that possible confusion. --------- Co-authored-by: Martin Geisler --- src/exercises/day-1/for-loops.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/exercises/day-1/for-loops.md b/src/exercises/day-1/for-loops.md index d5f96229..de45c319 100644 --- a/src/exercises/day-1/for-loops.md +++ b/src/exercises/day-1/for-loops.md @@ -85,9 +85,8 @@ preview of issues of ownership that will come later in the afternoon. Without the `&`... * The loop would have been one that consumes the array. This is a change [introduced in the 2021 - Edition](https://doc.rust-lang.org/edition-guide/rust-2021/IntoIterator-for-arrays.html), and ... -* since the array is also accessed in the second loop, an implicit - array copy would have occured; since `i32` is a copy type, then + Edition](https://doc.rust-lang.org/edition-guide/rust-2021/IntoIterator-for-arrays.html). +* An implicit array copy would have occured. Since `i32` is a copy type, then `[i32; 3]` is also a copy type.