Skip to content
Commit c07e67bd authored by Gary Guo's avatar Gary Guo Committed by Miguel Ojeda
Browse files

rust: str: implement several traits for `CStr`



Implement `Debug`, `Display`, `Deref` (into `BStr`), `AsRef<BStr>`
and a set of `Index<...>` traits.

This makes it `CStr` more convenient to use (and closer to `str`).

Co-developed-by: default avatarAlex Gaynor <alex.gaynor@gmail.com>
Signed-off-by: default avatarAlex Gaynor <alex.gaynor@gmail.com>
Co-developed-by: default avatarMorgan Bartlett <mjmouse9999@gmail.com>
Signed-off-by: default avatarMorgan Bartlett <mjmouse9999@gmail.com>
Signed-off-by: default avatarGary Guo <gary@garyguo.net>
[Reworded, adapted for upstream and applied latest changes]
Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent d126d238
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment