Rust can be very particular when it comes to mutability and references, and it is often not clear what is wrong. Take this example: let test = { vec![1u,2], vec![3u,4], }; test[0][0] = 5; As you might expect, this fails with an error message about mutability (since variables are immutable by default). error: cannot borrow […]
array
Sum or Product of an Array in Rust
I’ve been learning Rust (or “rustlang†for Google purposes – don’t even bother searching for “Rust on Windowsâ€) and it has been more difficult than anticipated because of the shifting foundation of the language. Much of what you find online is out-of-date and the documentation is not terribly helpful unless you know what you are […]