tokio-rs / prost

PROST! a Protocol Buffers implementation for the Rust Language
Apache License 2.0
3.69k stars 481 forks source link

Handle keyword `Self` after stripping enum type prefix #998

Closed MixusMinimax closed 3 months ago

MixusMinimax commented 4 months ago

Fixes #997

Relates to #179

MixusMinimax commented 4 months ago

The thing is, we know that the result starts with an upper-case letter, as it is already converted to PascalCase, so Self really was the only issue. I can definitely do that though!

Thank you for your consideration!

MixusMinimax commented 4 months ago

I have moved the sanitizing of identifiers to a common function that can be used by all the others. What do you think? I think it'd definitely a lot safer this way

MixusMinimax commented 3 months ago

Should be all done now

caspermeijn commented 3 months ago

Thanks for your contribution