3 ms·
Add more braces. Not joking. I find that a lot of Rust borrow checker problems can be solved by inserting more blocks. At the very least, it helps you isolat
by bsder 3y ago
Add more braces. Not joking.
I find that a lot of Rust borrow checker problems can be solved by inserting more blocks. At the very least, it helps you isolate precisely where the issue is.
I don't see this recommendation often for how much it seems to help beginners. To be fair, it's a lot less of an issue than it used to be as the borrow checker has gotten quite a bit better.