Commit 59ae59c
Merge #564
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>2 files changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
443 | | - | |
| 443 | + | |
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
| |||
805 | 805 | | |
806 | 806 | | |
807 | 807 | | |
808 | | - | |
| 808 | + | |
809 | 809 | | |
810 | 810 | | |
811 | 811 | | |
| |||
0 commit comments