Skip to content

Implement fmt::Display for Pid, Uid, Gid #1449

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

Merged
merged 1 commit into from
May 15, 2025

Conversation

rusty-snake
Copy link
Contributor

Closes #1439

@evilpie
Copy link
Contributor

evilpie commented Apr 21, 2025

It might be nice to implement more formatters like UpperHex. e.g. https://doc.rust-lang.org/src/core/num/nonzero.rs.html#136-153

Closes bytecodealliance#1439

Co-authored-by: Tom Schuster <evilpies@gmail.com>
@rusty-snake rusty-snake force-pushed the display-pid-uid-gid branch from d6cd1f3 to dd2fe86 Compare April 27, 2025 07:59
}
impl fmt::Binary for Uid {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.0.fmt(f)
Copy link
Member

Choose a reason for hiding this comment

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

Which fmt does this call? Does it call Binary::fmt or does it forward to Display::fmt?

And similar for all the other fmt::* impls.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sunfishcode sunfishcode merged commit 92466d9 into bytecodealliance:main May 15, 2025
34 of 51 checks passed
@sunfishcode
Copy link
Member

Thanks!

@rusty-snake rusty-snake deleted the display-pid-uid-gid branch May 15, 2025 17:24
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 core::fmt::Display for Pid, Uid, Gid?
3 participants