Skip to content

Serialize struct idents with Serializer::write_identifier#323

Merged
torkleyy merged 2 commits into
masterfrom
esc_ident
Oct 22, 2021
Merged

Serialize struct idents with Serializer::write_identifier#323
torkleyy merged 2 commits into
masterfrom
esc_ident

Conversation

@torkleyy

Copy link
Copy Markdown
Member

Previously, struct field idents would be written directly into the
output buffer.
Now, the write_identifier method is used to apply the usual logic
and serialize as raw ident if characters are found to not be a valid
regular identifier.

Fixes #322

Previously, struct field idents would be written directly into the
output buffer.
Now, the write_identifier method is used to apply the usual logic
and serialize as raw ident if characters are found to not be a valid
regular identifier.

Fixes #322
@torkleyy torkleyy marked this pull request as ready for review October 21, 2021 19:01
@torkleyy

Copy link
Copy Markdown
Member Author

r? @kvark

@torkleyy

Copy link
Copy Markdown
Member Author

I think we haven't had a breaking change, but I'm not actually sure. Should we do a 0.7 release instead?

@kvark kvark left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just one note, otherwise looks great!

Comment thread Cargo.toml Outdated
@torkleyy torkleyy merged commit 5687fe8 into master Oct 22, 2021
@torkleyy torkleyy deleted the esc_ident branch October 22, 2021 07:26
torkleyy added a commit that referenced this pull request Oct 22, 2021
Backport (#323): Serialize struct idents with Serializer::write_identifier
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.

Identifiers get serialized without raw ident escape

2 participants