6 ms·
I have learned to enjoy the from trait in my code. A single location of converting structures has been nice. I has also been a nice place to double down on test
by sbeckeriv 4y ago
I have learned to enjoy the from trait in my code. A single location of converting structures has been nice. I has also been a nice place to double down on tests. I usually call from in code.
https://doc.rust-lang.org/rust-by-example/conversion/from_into.html https://doc.rust-lang.org/rust-by-example/conversion/from_in...