6 ms·
That's not what standard Rust source code looks like. I don't see the point in the &* or boxing values. It's not very idiomatic. This is more representative of
by mmstick 10y ago
That's not what standard Rust source code looks like. I don't see the point in the &* or boxing values. It's not very idiomatic.
This is more representative of actual Rust software practices:
https://gist.github.com/mmstick/797fbc1cf20c92f05d33a85c38e1ffb1 https://gist.github.com/mmstick/797fbc1cf20c92f05d33a85c38e1...
- dbaupp 10y agoThe boxing there is perfectly idiomatic. Your code is likely to result in a pile of unnecessary code bloat, due to monomorphising the generic function twice, rather than just using dynamic dispatch (the overhead of which is likely trivial for IO operations). I would say that the dense layout is more confusing/weird than the actual operations the code is doing.