Simplified de-referencing for clarification

This commit is contained in:
Chris Boesch 2024-08-11 18:23:48 +02:00
parent 97c8bc39bc
commit 3baf0ae657
No known key found for this signature in database
GPG key ID: 8712DF4D3E364668

View file

@ -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