3 ms·
Can Rust now handle partial move semantics on structs? I remember reading it couldn't do it before, and there were threads about how you should make small struc
by didibus 7y ago
Can Rust now handle partial move semantics on structs? I remember reading it couldn't do it before, and there were threads about how you should make small structs because of that, or that you should not use methods, because they take ownership of the full struct and not just the fields that they actually use, etc.
- littlestymaar 7y agoIt can, with the big caveat that it only works well if you don't cross a function boundary.
- didibus 7y agoAh, so passing a struct as an argument to a function will still take ownership or borrow the entire struct?