Skip to content

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

Merged
sunfishcode merged 1 commit into
bytecodealliance:mainfrom
rusty-snake:display-pid-uid-gid
May 15, 2025
Merged

Implement fmt::Display for Pid, Uid, Gid#1449
sunfishcode merged 1 commit into
bytecodealliance:mainfrom
rusty-snake:display-pid-uid-gid

Conversation

@rusty-snake
Copy link
Copy Markdown
Contributor

Closes #1439

@evilpie
Copy link
Copy Markdown
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

Comment thread src/pid.rs Outdated
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
Comment thread src/ugid.rs
}
impl fmt::Binary for Uid {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.0.fmt(f)
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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