-
Notifications
You must be signed in to change notification settings - Fork 158
fix: Replace suffix before converting to snake case #564
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
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Emilgardis (or someone else) soon. Please see the contribution instructions for more information. |
adamgreig
left a comment
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.
Looks good, thank you!
The CI failure on nightly isn't an issue for this.
bors merge
564: fix: Replace suffix before converting to snake case r=adamgreig a=duskmoon314 ## Abstract In #563, we noticed that converting fields' names to snake cases before replacing the suffix caused the generated methods not to satisfy the snake case. This PR fixes this issue. ## Change Use `util::replace_suffix(&f.name, suffix).to_sanitized_snake_case()` instead of `util::replace_suffix(&f.name.to_sanitized_snake_case(), suffix)` when generating methods of fields. Co-authored-by: Campbell He <campbell.he@icloud.com>
|
Build failed: |
|
Oh, boo, since we aggregated all the CI jobs into one "CI", bors requires the nightly tests to pass as well, that's unfortunate. This needs esp-rs/xtensa-lx#14 to be merged and published, but I guess that might not be until after Rust 1.59. I'll open a PR to disable the Espressif CI in the meantime. |
565: Temporarily disable Espressif in CI until fixed upstream r=burrbull a=adamgreig See esp-rs/xtensa-lx#14 and #564 (comment) Co-authored-by: Adam Greig <adam@adamgreig.com>
|
bors retry |
|
Build succeeded: |
Abstract
In #563, we noticed that converting fields' names to snake cases before replacing the suffix caused the generated methods not to satisfy the snake case. This PR fixes this issue.
Change
Use
util::replace_suffix(&f.name, suffix).to_sanitized_snake_case()instead ofutil::replace_suffix(&f.name.to_sanitized_snake_case(), suffix)when generating methods of fields.