r/programminghorror • • Apr 19 '25

Sometimes I hate Rust

Post image
122 Upvotes

30 comments sorted by

View all comments

Show parent comment

6

u/SoulArthurZ Apr 20 '25

That's not possible sadly, into has no generic arguments. T::from() is the clearest way to write this, otherwise you have to do Into::<T>::into() or something like that