Skip to content

Revert serialization of features to string type #5292

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

Merged
merged 1 commit into from
Apr 4, 2018

Conversation

djc
Copy link
Contributor

@djc djc commented Apr 4, 2018

Accidentally broken during #5270 and only noticed after merge.

cc @matklad @Eh2406

S: Serializer,
{
use self::FeatureValue::*;
match *self {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shorter, but less performance code is: serializer.serialize_str(*self.to_string()). But this works too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah -- it's only 7 low-complexity extra lines to avoid the allocations on the common path. I figured it was worth it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, then this looks good to me. 👍

@alexcrichton
Copy link
Member

@bors: r+

Thanks for the quick fix!

@bors
Copy link
Contributor

bors commented Apr 4, 2018

📌 Commit 540bd45 has been approved by alexcrichton

bors added a commit that referenced this pull request Apr 4, 2018
Revert serialization of features to string type

Accidentally broken during #5270 and only noticed after merge.

cc @matklad @Eh2406
@bors
Copy link
Contributor

bors commented Apr 4, 2018

⌛ Testing commit 540bd45 with merge 0729e06...

@bors
Copy link
Contributor

bors commented Apr 4, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 0729e06 to master...

@bors bors merged commit 540bd45 into rust-lang:master Apr 4, 2018
@bors bors mentioned this pull request Apr 4, 2018
@djc djc deleted the feature-requirements branch April 5, 2018 15:17
@ehuss ehuss added this to the 1.27.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants