diff options
| author | Yutaro Ohno <[email protected]> | 2024-02-08 09:55:36 +0000 |
|---|---|---|
| committer | Miguel Ojeda <[email protected]> | 2024-02-25 18:17:31 +0000 |
| commit | 4951ddd51b816b5e4095cd3cd3bd46fb73b96a65 (patch) | |
| tree | fc5f089f9456c13e6d30bd46fe0f87d77f499783 /tools/perf/scripts/python/sctop.py | |
| parent | rust: module: place generated init_module() function in .init.text (diff) | |
| download | kernel-4951ddd51b816b5e4095cd3cd3bd46fb73b96a65.tar.gz kernel-4951ddd51b816b5e4095cd3cd3bd46fb73b96a65.zip | |
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 'tools/perf/scripts/python/sctop.py')
0 files changed, 0 insertions, 0 deletions
