aboutsummaryrefslogtreecommitdiff
path: root/rust/alloc/vec/mod.rs
diff options
context:
space:
mode:
authorYutaro Ohno <[email protected]>2024-02-08 18:55:36 +0900
committerMiguel Ojeda <[email protected]>2024-02-25 19:17:31 +0100
commit4951ddd51b816b5e4095cd3cd3bd46fb73b96a65 (patch)
treefc5f089f9456c13e6d30bd46fe0f87d77f499783 /rust/alloc/vec/mod.rs
parent1b6170ff7a203a5e8354f19b7839fe8b897a9c0d (diff)
rust: str: implement `Display` and `Debug` for `BStr`
Currently, `BStr` is just a type alias of `[u8]`, limiting its representation to a byte list rather than a character list, which is not ideal for printing and debugging. Implement `Display` and `Debug` traits for `BStr` to facilitate easier printing and debugging. Also, for this purpose, change `BStr` from a type alias of `[u8]` to a struct wrapper of `[u8]`. Co-developed-by: Virgile Andreani <[email protected]> Signed-off-by: Virgile Andreani <[email protected]> Signed-off-by: Yutaro Ohno <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/ZcSlGMGP-e9HqybA@ohnotp [ Formatted code comment. ] Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/alloc/vec/mod.rs')
0 files changed, 0 insertions, 0 deletions