-
Notifications
You must be signed in to change notification settings - Fork 950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Into
with From
#2169
Replace Into
with From
#2169
Conversation
Unless restricted by orphan rules, implementing `From` is superior because it implies `Into` but leaves the choice to the user, which one to use. Especially for errors, `From` is convenient because that is what `?` builds on.
Into
with From
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thanks!
Not sure if this needs a changelog entry?
Yes please, as it adds From
implementations. Also, please bump the patch version of multistream-select
in misc/multistream/Cargo.toml
and ./Cargo.toml
.
Okay will add. On the topic of version bumps: What is the reasoning to do these together with the actual change and not on release time? For all my projects, I usually track all changes in the changelog under an unversioned A practical implication of this is that cargo's |
A couple of arguments that in my eyes speak for the current strategy:
Indeed, this is a downside of the current approach, though in my eyes a cost worth paying given the extra safety at release time. What do you think of the arguments above? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing the Cargo.toml
bumps. Other than that, this is good to go.
That does make sense! I am not particularly familiar with releasing within workspaces that have lots of crates, so I can see how this can be an issue. |
I wasn't quite sure what you are referring to with |
Ah, sorry. Please bump the version in |
Shouldn't be necessary, |
Correct. It is a reminder for me to make sure I release Let's leave it as is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Unless restricted by orphan rules, implementing
From
is superiorbecause it implies
Into
but leaves the choice to the user, whichone to use. Especially for errors,
From
is convenient because thatis what
?
builds on.Not sure if this needs a changelog entry?