diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2023-11-21 15:01:22 +0100 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2023-11-21 15:01:22 +0100 |
| commit | 7679f93f688452b2236d20b49f92569b8d56e20d (patch) | |
| tree | 26712b6e6bd28c5a265d9831246e1226f6944c4f /exercises/058_quiz7.zig | |
| parent | b7015c2d9d50da77cf1a3897f84e1b736649beef (diff) | |
Converted var to const if there is no mutation in var.
This is checked from compiler version 0.12.0-dev.1664
Diffstat (limited to 'exercises/058_quiz7.zig')
| -rw-r--r-- | exercises/058_quiz7.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/exercises/058_quiz7.zig b/exercises/058_quiz7.zig index bbdebf6..cf32fc3 100644 --- a/exercises/058_quiz7.zig +++ b/exercises/058_quiz7.zig @@ -273,7 +273,7 @@ const HermitsNotebook = struct { // distance) than the one we'd noted before. If it is, we // overwrite the old entry with the new one. fn checkNote(self: *HermitsNotebook, note: NotebookEntry) void { - var existing_entry = self.getEntry(note.place); + const existing_entry = self.getEntry(note.place); if (existing_entry == null) { self.entries[self.end_of_entries] = note; @@ -386,7 +386,7 @@ pub fn main() void { // "start" entry we just added) until we run out, at which point // we'll have checked every reachable Place. while (notebook.hasNextEntry()) { - var place_entry = notebook.getNextEntry(); + const place_entry = notebook.getNextEntry(); // For every Path that leads FROM the current Place, create a // new note (in the form of a NotebookEntry) with the |
