-
Notifications
You must be signed in to change notification settings - Fork 11
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
Implement Display
for svix_ksuid::Ksuid
#2
Comments
indiv0
changed the title
Implement
Implement May 17, 2022
Display
to svix_ksuid::Ksuid
Display
for svix_ksuid::Ksuid
Thanks for the suggestion, this was just a silly oversight! Would you prefer to write the PR yourself (so you get the attribution), or have me write it? |
Go ahead, I'm OK with just having the feature added 😄 |
tasn
added a commit
that referenced
this issue
May 18, 2022
We shouldn't be implementing ToString directly, but rather Display. Fixes #2.
tasn
added a commit
that referenced
this issue
May 18, 2022
We shouldn't be implementing ToString directly, but rather Display. Fixes #2.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Request
Motivation
Hi! I'm not sure if this is intentional, but it looks like
Ksuid
doesn't implementDisplay
.This means that to print it out you need to do
format!("{}", ksuid.to_string())
rather than justformat!("{}", ksuid)
.Not a big deal, but adds some verbosity.
Proposal
Implementing
Display
should be as simple as moving the existingto_string
logic into aDisplay
impl.I'm not sure if the type doesn't implement
Display
intentionally though. Perhaps this was done to avoid some API guarantees?Alternatives
N/A
The text was updated successfully, but these errors were encountered: