-
-
Notifications
You must be signed in to change notification settings - Fork 415
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
proto: Pass ConnectionId
by value internally
#2109
Conversation
I don't think we want to change the public API for this right now. |
30b5b60
to
acf3c76
Compare
ConnectionId
by valueConnectionId
by value internally
Understandable. I changed this PR so it only changes proto internally, without touching its API. Maybe we just prefer to pass by value in new APIs? |
ConnectionId
by value internallyConnectionId
by value internally
Feel free to stash the public changes in a separate PR so we don't forget to bring them back in on the next breaking release. |
acf3c76
to
ef47eb8
Compare
ef47eb8
to
1e8131a
Compare
Maybe file an issue with a label so that we don't forget to clean up the public API instances of this when we get ready to release 0.12? |
@djc to make sure I understand the reasoning: we haven't added semver-breaking changes since the last release, so we currently have the ability for our next release to be a minor version bump, and this change here isn't valuable enough to want to sacrifice that ability, so we want to wait to make such a change until some other PR appears which creates more motivation to do a breaking change. Is my understanding correct? |
Same idea as #2107 but for
ConnectionId
.ConnectionId
is, and probably always will be,Copy
.ConnectionId
is not remotely large enough to trigger stack overflows or severe performance hazards by being copied. So, we should just simplify the code and let the compiler figure out if it wants to optimize it elsewise.Plus, this shaves off a few lines by convincing the rustfmt to collapse some multi-line method signatures into one line.Edit: Changes this PR to only do so internally, and not change the API.