mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-10 09:00:00 +00:00
dev.1711 - switched to multi-object-for-loops
This commit is contained in:
@@ -102,7 +102,7 @@ const HermitsNotebook = struct {
|
||||
end_of_entries: u8 = 0,
|
||||
|
||||
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;
|
||||
if (place == entry.*.?.place) return &entry.*.?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user