Re:Bugs that the Rust compiler catches for you
by carlmr on Friday May 06, 2022 @03:22AM
(#31282321)
This is what I mean, I ported some Python code almost 1:1.
If you program in a functional way anyway, i.e. having data go through a series of filters, it is quite easy. But not all ways of programming are so easy to port to Rust.
Mutating things is mostly not that difficult, just add mut to the declaration and then &mut if you pass it around.
The most difficult thing was lifetimes.
E: borrows got a little tricky as well