diff options
Diffstat (limited to 'patches')
-rw-r--r-- | patches/patches/025_errors5.patch | 8 | ||||
-rw-r--r-- | patches/patches/075_quiz8.patch | 4 | ||||
-rw-r--r-- | patches/patches/080_anonymous_structs.patch | 12 | ||||
-rw-r--r-- | patches/patches/096_memory_allocation.patch | 8 |
4 files changed, 16 insertions, 16 deletions
diff --git a/patches/patches/025_errors5.patch b/patches/patches/025_errors5.patch index 4495ed6..6dad689 100644 --- a/patches/patches/025_errors5.patch +++ b/patches/patches/025_errors5.patch @@ -1,11 +1,11 @@ ---- exercises/025_errors5.zig 2023-10-03 22:15:22.122241138 +0200 -+++ answers/025_errors5.zig 2023-10-05 20:04:06.952764946 +0200 +--- exercises/025_errors5.zig 2023-11-21 14:22:48.159250165 +0100 ++++ answers/025_errors5.zig 2023-11-21 14:25:01.338277886 +0100 @@ -26,7 +26,7 @@ // This function needs to return any error which might come back from detect(). // Please use a "try" statement rather than a "catch". // -- var x = detect(n); -+ var x = try detect(n); +- const x = detect(n); ++ const x = try detect(n); return x + 5; } diff --git a/patches/patches/075_quiz8.patch b/patches/patches/075_quiz8.patch index 1bb9e5d..1ff5016 100644 --- a/patches/patches/075_quiz8.patch +++ b/patches/patches/075_quiz8.patch @@ -1,5 +1,5 @@ ---- exercises/075_quiz8.zig 2023-10-03 22:15:22.125574535 +0200 -+++ answers/075_quiz8.zig 2023-10-05 20:04:07.182769252 +0200 +--- exercises/075_quiz8.zig 2023-11-21 14:48:15.440702720 +0100 ++++ answers/075_quiz8.zig 2023-11-21 14:50:23.453311616 +0100 @@ -49,7 +49,11 @@ // // Please fill in the body of this function! diff --git a/patches/patches/080_anonymous_structs.patch b/patches/patches/080_anonymous_structs.patch index a46ea41..52c0980 100644 --- a/patches/patches/080_anonymous_structs.patch +++ b/patches/patches/080_anonymous_structs.patch @@ -1,18 +1,18 @@ ---- exercises/080_anonymous_structs.zig 2023-10-03 22:15:22.125574535 +0200 -+++ answers/080_anonymous_structs.zig 2023-10-05 20:04:07.202769626 +0200 +--- exercises/080_anonymous_structs.zig 2023-11-21 14:52:54.312749682 +0100 ++++ answers/080_anonymous_structs.zig 2023-11-21 14:52:43.909225238 +0100 @@ -48,13 +48,13 @@ // * circle1 should hold i32 integers // * circle2 should hold f32 floats // -- var circle1 = ??? { -+ var circle1 = Circle(i32){ +- const circle1 = ??? { ++ const circle1 = Circle(i32){ .center_x = 25, .center_y = 70, .radius = 15, }; -- var circle2 = ??? { -+ var circle2 = Circle(f32){ +- const circle2 = ??? { ++ const circle2 = Circle(f32){ .center_x = 25.234, .center_y = 70.999, .radius = 15.714, diff --git a/patches/patches/096_memory_allocation.patch b/patches/patches/096_memory_allocation.patch index aab718f..c26eeeb 100644 --- a/patches/patches/096_memory_allocation.patch +++ b/patches/patches/096_memory_allocation.patch @@ -1,11 +1,11 @@ ---- exercises/096_memory_allocation.zig 2023-10-03 22:15:22.125574535 +0200 -+++ answers/096_memory_allocation.zig 2023-10-05 20:04:07.276104333 +0200 +--- exercises/096_memory_allocation.zig 2023-11-21 14:55:33.805678390 +0100 ++++ answers/096_memory_allocation.zig 2023-11-21 14:56:00.236163484 +0100 @@ -64,7 +64,7 @@ const allocator = arena.allocator(); // allocate memory for this array -- var avg: []f64 = ???; -+ var avg: []f64 = try allocator.alloc(f64, arr.len); +- const avg: []f64 = ???; ++ const avg: []f64 = try allocator.alloc(f64, arr.len); runningAverage(arr, avg); std.debug.print("Running Average: ", .{}); |