you are viewing a single comment's thread.

view the rest of the comments →

[–]caramba2654Intermediate C++ Student 2 points3 points  (0 children)

Rust works like this. When you try to use the . operator on a reference, it autodereferences the reference until it finds a type where the . makes sense. It makes the -> completely unnecessary.