euclid icon indicating copy to clipboard operation
euclid copied to clipboard

Replace all `Into` impls with `From` impls

Open hannobraun opened this issue 4 years ago • 10 comments

As per Into's documentation, Into should not be implemented, if possible, and From should be implemented instead. This is more flexible, as there is a blanket impl that implements Into for all From.

hannobraun avatar Apr 12 '20 10:04 hannobraun

Okay, looks like this won't work with Rust 1.31.0. I've converted this pull request into a draft, in case the minimum supported Rust version will be increased any time soon. Please let me know, if you want me to close it instead.

hannobraun avatar Apr 12 '20 10:04 hannobraun

:umbrella: The latest upstream changes (presumably #442) made this pull request unmergeable. Please resolve the merge conflicts.

bors-servo avatar Jun 22 '20 15:06 bors-servo

Rebased.

hannobraun avatar Jun 22 '20 17:06 hannobraun

I'm looking into opening up for breaking changes soon and make 0.21 release some time within the next few weeks in which we can incorporate a compiler version bump and this change.

nical avatar Jul 08 '20 14:07 nical

:umbrella: The latest upstream changes (presumably #413) made this pull request unmergeable. Please resolve the merge conflicts.

bors-servo avatar Jul 12 '20 18:07 bors-servo

Rebased.

hannobraun avatar Jul 13 '20 12:07 hannobraun

Looks like the language change that allows this was added in rustc 1.41.

Right now we are compatible with 1.31 and the current wave of breaking changes is a good opportunity to bump to a more recent version, however 1.41 is a bigge leap than I thought. For example that would make euclid incompatible with the rustc version packaged in debian (currently 1.34.2). I'd prefer a stronger motivation to trade compatibility, unless the missing blanket impls are causing grief.

nical avatar Jul 22 '20 12:07 nical

I don't remember what my motivation for submitting this was, but I'm depending on upstream euclid. I must have been able to work around whatever problem I was having. So drastic measures are definitely unnecessary, as far as I'm concerned.

How do you want to proceed here? I don't mind keeping this open and rebased for now, but I can't guarantee that won't change in however many years it takes for Debian to get up to speed :-)

hannobraun avatar Jul 22 '20 14:07 hannobraun

We can keep this open here, or if having that one PR open causes frustation we can clause it and reopen later, I don't mind either way. No need to rebase it continuously in any case, it's a mechanical enough change that you or someone else can rebase/re-do it later when we finaly chose to depend on a more recent compiler version. Thanks in any case for your patience and understanding.

nical avatar Jul 22 '20 14:07 nical

Sound good :+1:

hannobraun avatar Jul 23 '20 07:07 hannobraun

:umbrella: The latest upstream changes (presumably #498) made this pull request unmergeable. Please resolve the merge conflicts.

bors-servo avatar Mar 23 '23 18:03 bors-servo

@hannobraun Now the MSRV has been increased to 1.56 (Rust 2021). Do you have the ability to complete this request?

ArtHome12 avatar Mar 30 '23 03:03 ArtHome12

@ArtHome12: I've rebased the branch on latest master. cargo test passes, but I didn't do any testing beyond that. I no longer have any applications that use euclid.

hannobraun avatar Mar 30 '23 07:03 hannobraun

Thanks!

@bors-servo r+

nical avatar Mar 30 '23 09:03 nical

:pushpin: Commit a5af28e has been approved by nical

bors-servo avatar Mar 30 '23 09:03 bors-servo

:hourglass: Testing commit a5af28e206424f55b5b6dd017e4e0a30847de6a3 with merge 9d704545b77ed84bd76acf9ebddaa308d244e5b0...

bors-servo avatar Mar 30 '23 09:03 bors-servo

:sunny: Test successful - checks-github Approved by: nical Pushing 9d704545b77ed84bd76acf9ebddaa308d244e5b0 to master...

bors-servo avatar Mar 30 '23 09:03 bors-servo

:sunny: Test successful - checks-github Approved by: nical Pushing 9d704545b77ed84bd76acf9ebddaa308d244e5b0 to master...

bors-servo avatar Mar 30 '23 09:03 bors-servo