mirror of
https://codeberg.org/ziglings/exercises.git
synced 2024-12-26 01:20:30 +00:00
Merge pull request 'Simplified de-referencing for clarification' (#143) from i139 into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/143
This commit is contained in:
commit
118c1252be
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ pub fn main() void {
|
||||||
// If e1 and e2 are valid pointers to elephants,
|
// If e1 and e2 are valid pointers to elephants,
|
||||||
// this function links the elephants so that e1's tail "points" to e2.
|
// this function links the elephants so that e1's tail "points" to e2.
|
||||||
fn linkElephants(e1: ?*Elephant, e2: ?*Elephant) void {
|
fn linkElephants(e1: ?*Elephant, e2: ?*Elephant) void {
|
||||||
e1.?.*.tail = e2.?;
|
e1.?.tail = e2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function visits all elephants once, starting with the
|
// This function visits all elephants once, starting with the
|
||||||
|
|
Loading…
Reference in a new issue