News for hackers. Stuff that matters.
Re:A half-hour to learn Rust by pimeys on Sunday January 03, 2021 @06:02AM (#25621060)
This would work if `Integer` would implement the `Copy` trait. But I guess that type is heavy enough for it to be too expensive, therefore forcing you to explicitly call `clone()`.
Re:A half-hour to learn Rust by Measter on Sunday January 03, 2021 @07:21AM (#25621366)
That `Integer` type can't implement `Copy` because it manages a resource, meaning you can't just do a simple memcpy of the type.