Replace From implementation of SwapInterval that could panic with TryFrom#1413
Conversation
|
Doesn't seem a very useful breaking change to remove the From, although there is value is adding TryFrom. Could you please re-add From to call TryFrom? |
|
I can't, (see first comment), all |
0119b60 to
51451e4
Compare
|
I see, so we can only do that when trait impl specialization is in stable. I think for now we could just add something that acts like try_from but doesn't use the trait TryFrom to avoid conflict, and then when it stabilized without breaking anything we can impl try_from directly. |
This can take a while, and I don't expect that this will be specializable, because that would allow different logic for
We can add an inherent function The simplest way is 'just do a breaking change', it can be argued how many people use |
I would prefer that. I know it's extremely minor but personally I hate when I update a library with a breaking change and it didn't even leave me 1 version of leeway to migrate to a new version using deprecation. Plus, I really doubt that the trait |
dba99f0 to
b2f24d1
Compare
|
Apparently you can't deprecate a trait implementation in Rust, so I added a |
|
Println in the console is really dirty, I would rather have nothing at runtime and just leave it as-is, but put the deprecation notice in a doc comment |
e3136b8 to
8212893
Compare
|
Rebased this one and my 2 other PRs |
8212893 to
fb4e845
Compare
fb4e845 to
bbb1a1b
Compare
…dd `TryFrom`-like inherent function.
bbb1a1b to
5b946bd
Compare
|
@Cobrand is this ready for merge? |
fixes #1311
Unfortunately this is a breaking change, Rust automatically implements
TryFromfor types that implementFrom, so just adding theTryFromimplementation will not work.