Modifying the contents of an array of Vectors in Rust

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 […]

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 […]