Re:Rust 1.50
by lilyball on Thursday February 11, 2021 @08:41PM
(#26109883)
In what way is johnsoft’s code not forwards-compatible?
> Your code is not forward compatible. The proper way is to implement it is as i32 and then unwrap it
That’s what they’re doing. It’s a newtype for i32 with a few named values but it can represent any i32, and you can unwrap it with .0 to get the i32 value.
> Your code is not forward compatible. The proper way is to implement it is as i32 and then unwrap it
That’s what they’re doing. It’s a newtype for i32 with a few named values but it can represent any i32, and you can unwrap it with .0 to get the i32 value.