Skip to content

Commit f369afc

Browse files
committed
rust: kernel: str: Implement Debug for CString
Signed-off-by: Asahi Lina <[email protected]>
1 parent 43586cf commit f369afc

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

rust/kernel/str.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,12 @@ impl Deref for CString {
584584
}
585585
}
586586

587+
impl fmt::Debug for CString {
588+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
589+
fmt::Debug::fmt(&**self, f)
590+
}
591+
}
592+
587593
/// A convenience alias for [`core::format_args`].
588594
#[macro_export]
589595
macro_rules! fmt {

0 commit comments

Comments
 (0)