diff options
author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2023-02-21 21:54:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-21 21:54:09 +0100 |
commit | c34380e939386d390f99a4f2d020fbd086988faa (patch) | |
tree | 91ba1b1985a88d275016ccc7d1531265c6fa9907 /exercises/058_quiz7.zig | |
parent | 8da0a6aa7d276bd11db017ac8f809c8692314fc5 (diff) | |
parent | e7326dc5f92dd8a2dc8bd7cafb5b3eaaf55ce99b (diff) |
Merge pull request #191 from chrboesch/dev_1711
dev.1711 - switched to multi-object-for-loops
Diffstat (limited to 'exercises/058_quiz7.zig')
-rw-r--r-- | exercises/058_quiz7.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/exercises/058_quiz7.zig b/exercises/058_quiz7.zig index 0d5bcaa..3069710 100644 --- a/exercises/058_quiz7.zig +++ b/exercises/058_quiz7.zig @@ -239,7 +239,7 @@ const HermitsNotebook = struct { // We'll often want to find an entry by Place. If one is not // found, we return null. fn getEntry(self: *HermitsNotebook, place: *const Place) ?*NotebookEntry { - for (self.entries) |*entry, i| { + for (&self.entries, 0..) |*entry, i| { if (i >= self.end_of_entries) break; // Here's where the hermit got stuck. We need to return |