summaryrefslogtreecommitdiff
path: root/exercises/075_quiz8.zig
diff options
context:
space:
mode:
authorChris Boesch <chrboesch@noreply.codeberg.org>2026-05-04 17:30:31 +0200
committerChris Boesch <chrboesch@noreply.codeberg.org>2026-05-04 17:30:31 +0200
commitdde51b3126b0f9cfbbf5d1ec49fd19ad37dd5a5f (patch)
treea333fe8d515ae8fad19a94e37bdc4649f6dd662c /exercises/075_quiz8.zig
parent1ba1e301a8a977f652157ca60a0522c95bc736aa (diff)
parent8af3372cf204861f8541f91e47543f1b33337c5b (diff)
Merge pull request 'fixed removed array multiplication' (#423) from array_mult into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/423
Diffstat (limited to 'exercises/075_quiz8.zig')
-rw-r--r--exercises/075_quiz8.zig8
1 files changed, 3 insertions, 5 deletions
diff --git a/exercises/075_quiz8.zig b/exercises/075_quiz8.zig
index 63d208b..08270ee 100644
--- a/exercises/075_quiz8.zig
+++ b/exercises/075_quiz8.zig
@@ -48,9 +48,7 @@ const Path = struct {
// instead.
//
// Please fill in the body of this function!
-fn makePath(from: *Place, to: *Place, dist: u8) Path {
-
-}
+fn makePath(from: *Place, to: *Place, dist: u8) Path {}
// Using our new function, these path definitions take up considerably less
// space in our program now!
@@ -97,7 +95,7 @@ const NotebookEntry = struct {
};
const HermitsNotebook = struct {
- entries: [place_count]?NotebookEntry = .{null} ** place_count,
+ entries: [place_count]?NotebookEntry = @splat(null),
next_entry: u8 = 0,
end_of_entries: u8 = 0,
@@ -193,7 +191,7 @@ pub fn main() void {
}
}
- var trip = [_]?TripItem{null} ** (place_count * 2);
+ var trip: [place_count * 2]?TripItem = @splat(null);
notebook.getTripTo(trip[0..], destination) catch |err| {
print("Oh no! {}\n", .{err});