summaryrefslogtreecommitdiff
path: root/exercises
diff options
context:
space:
mode:
authorChris Boesch <chrboesch@noreply.codeberg.org>2024-09-04 20:52:42 +0200
committerChris Boesch <chrboesch@noreply.codeberg.org>2024-09-04 20:52:42 +0200
commit7f1df869382bcb4dfc7847d72c24cdd915fb579d (patch)
tree763e19593357f511c9bdb98311b9323146a9457d /exercises
parent2e5b570aef6cae57d00a253da61a62a504146a09 (diff)
Reseted the simplification for de-referencing.
Diffstat (limited to 'exercises')
-rw-r--r--exercises/046_optionals2.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/exercises/046_optionals2.zig b/exercises/046_optionals2.zig
index 86654f7..a5436d9 100644
--- a/exercises/046_optionals2.zig
+++ b/exercises/046_optionals2.zig
@@ -48,7 +48,7 @@ pub fn main() void {
// If e1 and e2 are valid pointers to elephants,
// this function links the elephants so that e1's tail "points" to e2.
fn linkElephants(e1: ?*Elephant, e2: ?*Elephant) void {
- e1.?.tail = e2;
+ e1.?.*.tail = e2.?;
}
// This function visits all elephants once, starting with the