Skip to content

impl LowerHex, UpperHex for &[u8] #41674

Closed
@luser

Description

@luser

I've found myself writing some version of bytes_to_hex more than once, and it looks like I'm not the only one:
https://github.com/search?l=Rust&q=bytes_to_hex&type=Code&utf8=%E2%9C%93

I think a nice addition would be to impl LowerHex and UpperHex for &[u8], so that you could simply do format!("{:x}", bytes).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions