mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-03 05:27:36 +00:00
![]() Convert some `Into` impls into `From` impls From the [`From`](https://doc.rust-lang.org/std/convert/trait.From.html) docs: > One should always prefer implementing `From` over [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) because implementing `From` automatically provides one with an implementation of [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) thanks to the blanket implementation in the standard library. > > Only implement [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) when targeting a version prior to Rust 1.41 and converting to a type outside the current crate. `From` was not able to do these types of conversions in earlier versions because of Rust’s orphaning rules. See [Into](https://doc.rust-lang.org/std/convert/trait.Into.html) for more details. Some of these impls are likely from before 1.41, and then some others were probably just mistakes. Building nightly rust is definitely not supported on 1.41, so let's modernize these impls :D |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |