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

impl Format for NonZero* #509

Merged
merged 1 commit into from
Jun 16, 2021
Merged

impl Format for NonZero* #509

merged 1 commit into from
Jun 16, 2021

Conversation

Urhengulas
Copy link
Member

Fixes #501

($type:ty) => {
impl Format for $type {
fn format(&self, fmt: Formatter) {
crate::write!(fmt, "{}", self.get());
Copy link
Contributor

Choose a reason for hiding this comment

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

This format string could specify the type directly, which would be more efficient. Not a blocker, but please create an issue tracking this (or add a FIXME) if you don't want to do it in this PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

I see. I will try to do it here.

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

perfect!

Copy link
Member Author

Choose a reason for hiding this comment

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

😊

@jonas-schievink
Copy link
Contributor

bors r+

@bors
Copy link
Contributor

bors bot commented Jun 16, 2021

Build succeeded:

@bors bors bot merged commit 411fc5f into main Jun 16, 2021
@bors bors bot deleted the format-for-nonzero branch June 16, 2021 16:44
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.

impl Format for NonZero* types
2 participants