Skip to content

Commit 0d7964d

Browse files
authoredApr 7, 2025··
Merge pull request #1920 from wazawoo/improve-clarity-on-testcase-list
Rename count to index for clarity
2 parents d5f826a + e6c8e5d commit 0d7964d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/hello/print/print_display/testcase_list.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ impl fmt::Display for List {
3131
write!(f, "[")?;
3232
3333
// Iterate over `v` in `vec` while enumerating the iteration
34-
// count in `count`.
35-
for (count, v) in vec.iter().enumerate() {
34+
// index in `index`.
35+
for (index, v) in vec.iter().enumerate() {
3636
// For every element except the first, add a comma.
3737
// Use the ? operator to return on errors.
38-
if count != 0 { write!(f, ", ")?; }
38+
if index != 0 { write!(f, ", ")?; }
3939
write!(f, "{}", v)?;
4040
}
4141

0 commit comments

Comments
 (0)
Please sign in to comment.