.into(), .try_into(), .from(), .parse(), `as`, and all the traits backing these. There's quite some ground to cover when learning about Rust type conversions.
-
Show this thread
-
Replying to @yoshuawuyts
I have been joking for two years that once TryInto is stable I'll make a rustfix mode that tries to fix every otherwise unfixable errors by appending `.try_into()?`
1 reply 0 retweets 5 likes -
Replying to @killercup
I'm actually thinking about the inverse: what if it became standard to implement `TryFrom`, and almost everybody would start doing conversions with `.try_into()?`. Clippy could then add a lint that says: "saw you used .try_into(), but regular .into() is available and preferred."
1 reply 0 retweets 0 likes
Replying to @yoshuawuyts @killercup
With perhaps cargo fix / RLS adding an auto-fix path on top of this. Might make all of these methods a bit more straight forward, haha.
7:03 AM - 26 Oct 2018
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.