summaryrefslogtreecommitdiff
path: root/exercises/075_quiz8.zig
diff options
context:
space:
mode:
authorChris Boesch <chrboesch@noreply.codeberg.org>2023-11-21 14:26:23 +0000
committerChris Boesch <chrboesch@noreply.codeberg.org>2023-11-21 14:26:23 +0000
commitf987a06cccc47b79e78203870eac443051002895 (patch)
treeb86b2d9f183722cefebec23e10408364aba969bb /exercises/075_quiz8.zig
parentb7015c2d9d50da77cf1a3897f84e1b736649beef (diff)
parentb0511bb3c7ac0293edbb68fc54fbd8eba27a5882 (diff)
Merge pull request 'Converted var to const if there is no mutation in the var.' (#28) from var_const into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/28
Diffstat (limited to 'exercises/075_quiz8.zig')
-rw-r--r--exercises/075_quiz8.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/exercises/075_quiz8.zig b/exercises/075_quiz8.zig
index 12b460c..63d208b 100644
--- a/exercises/075_quiz8.zig
+++ b/exercises/075_quiz8.zig
@@ -110,7 +110,7 @@ const HermitsNotebook = struct {
}
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;
@@ -180,7 +180,7 @@ pub fn main() void {
notebook.checkNote(working_note);
while (notebook.hasNextEntry()) {
- var place_entry = notebook.getNextEntry();
+ const place_entry = notebook.getNextEntry();
for (place_entry.place.paths) |*path| {
working_note = NotebookEntry{