Skip to content
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

feat: support more case options #41

Merged
merged 2 commits into from
Oct 29, 2024
Merged

feat: support more case options #41

merged 2 commits into from
Oct 29, 2024

Conversation

zaaarf
Copy link
Contributor

@zaaarf zaaarf commented Oct 28, 2024

Hey, nice library! I was just about to write my own stringifier, but then I discovered this existed. Unfortunately, it doesn't support everything I needed. Specifically, the case conversion. So I added some more. I was originally going to write them by hand, but then I discovered that this exists, so I just based it on that.

One downside of doing it like this is what was formerly "lower" and "upper" are now "flat" and "upper_flat". Let me know if you don't like this or whatever.

@Yag000
Copy link
Owner

Yag000 commented Oct 29, 2024

Thanks ! I was thinking of doing something like this in the future but I never got around doing it.

The name changes seem reasonable !

I'll merge this and release a new version.

Thanks again !

@Yag000 Yag000 merged commit e02f802 into Yag000:master Oct 29, 2024
3 checks passed
@zaaarf zaaarf mentioned this pull request Nov 28, 2024
Yag000 added a commit that referenced this pull request Nov 30, 2024
The advantage is that, unlike `()`, `String` implements `Display`. I get
that you made it `()` to avoid having a library that users have to
depend on at runtime, but this should be a fair compromise.

Makes it easier to do debugging (and some libraries want error types to
necessarily implement `Display`).

P.S.: just realized that in my previous PR (#41) I forgot to update the
README and docs accordingly. You should probably do that. Or I can, if
you prefer, I don't mind.
zaaarf added a commit to zaaarf/enum-stringify that referenced this pull request Dec 1, 2024
@zaaarf zaaarf mentioned this pull request Dec 1, 2024
Yag000 added a commit that referenced this pull request Dec 2, 2024
Forgot to update docs in #41.

I actually don't know if it's legal to link to another crate's docs as I
did here for the `Case` enum. Let me know if crates.io rejects this or
whatever.
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.

2 participants