diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2024-08-11 18:23:48 +0200 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2024-08-11 18:23:48 +0200 |
| commit | 3baf0ae657a80e8a63e96924560a3908b6ea6a9d (patch) | |
| tree | 66e83e13ebe9431eb3e976f29052c2ec9d426011 /exercises/046_optionals2.zig | |
| parent | 97c8bc39bc6cde4be41c2e7bace1294368d791b7 (diff) | |
Simplified de-referencing for clarification
Diffstat (limited to 'exercises/046_optionals2.zig')
| -rw-r--r-- | exercises/046_optionals2.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/exercises/046_optionals2.zig b/exercises/046_optionals2.zig index a5436d9..86654f7 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 |
