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

Implement Display for Code #386

Merged
merged 1 commit into from
Jul 6, 2020
Merged

Conversation

MikailBag
Copy link
Contributor

Motivation

Resolves #383

Solution

This PR adds Display impl for Code.
Additionally, it adds description method to get Code description as static string.

@MikailBag MikailBag force-pushed the display-code branch 2 times, most recently from 4e319f7 to 1b19c91 Compare July 5, 2020 09:03
Copy link
Member

@LucioFranco LucioFranco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! Can you rebase against master to get CI working again.

Code::Unavailable => "The service is currently unavailable",
Code::DataLoss => "Unrecoverable data loss or corruption",
Code::Unauthenticated => "The request does not have valid authentication credentials",
Code::__NonExhaustive => panic!("__NonExhaustive variant must not be constructed"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could probably be an unreachable!

Copy link
Member

@LucioFranco LucioFranco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@LucioFranco LucioFranco merged commit ab1de44 into hyperium:master Jul 6, 2020
@MikailBag MikailBag deleted the display-code branch August 9, 2020 22:32
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.

Implement Display for Code
2 participants