Re:Async-await on stable Rust
by saghm on Friday November 08, 2019 @11:46AM
(#21483974)
That still doesn't preclude the possibility that within the module the function gets called with a field from another instance. I think the idea is that by making it a method that just takes a reference to self, it's impossible to accidentally mutate a field on a different instance, while taking a reference to the field itself doesn't prevent the programmer from accidentally calling it with the wrong instance of the field.
[ Parent
| on HN ]
There are no comments on this comment yet.