Conversation
|
So I was thinking about this, and my feeling is that the previous (now merged) PR that allows for different separators, is possibly not that useful (at least I can't think of a use case where someone would want a different character to What we ultimately want is to be able to PascalCase generated types/typedefs. So my proposal is to merge the two (remove underscores and PascalCase primitives), to something like |
|
|
Yes, although I'm also suggesting they could be merged into one option.
OK, I'm just struggling to think of a use case where someone would want a different |
|
@emilio please review the updated changes when you have time. Thank you. |
emilio
left a comment
There was a problem hiding this comment.
This looks generally good, but I have some nits and one error in to_str. I'm still not a fan of removing an existing option for mangle_separator somewhat arbitrarily, but I guess it's relatively new so it can be fine.
Can you squash the commits too?
20906d8 to
7e0e2a8
Compare
… for PascalCase conversion
Fix warnings Tests passed! Fix refactor mistake Add #[cfg(test)] to import Rename to rename_types
7e0e2a8 to
caf256b
Compare
|
Thanks! This looks fine. I have a few nits but I addressed them in a follow-up commit in #575. In particular, the rename_types should probably be on its own subsection of the configuration, otherwise being under |
|
Closing because I merged this in #575 |
This properly addresses our use case where we want to the default of e.g.
MyType______c_charto beMyTypeCChar. The previous PR did not take thec_chartype or similar into account, only capitalising the first letter for e.g.MyTypeU32.