Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
fuckwit133525dFirst thing that helps is a different thinking of references. Instead of calling them mutable or not just call them:
- exclusive reference (&mut) only one can exist at any time and you can change data through it
- shared reference (&) multiple can exist at the same time but you can only read
This is what I saw most people struggling with. Also don't care about lifetimes yet. Just roughly know what they do but try to avoid them. The compiler is smart enough to infer them more often then not.
Pro tip: listen to what the compiler tells you. The error messages are some of the best out there and it often gives you some tips on what to correct.
fuckwit133525dOh and don't be afraid to ask questions on r/rust
The community there is very helpful and will be happy to point you into the right direction.