Skip to content

Commit f1577b0

Browse files
committed
Implement Debug
1 parent 493768f commit f1577b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/c_string.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,12 @@ impl<const N: usize, LenT: LenType> Ord for CString<N, LenT> {
321321
}
322322
}
323323

324+
impl<const N: usize, LenT: LenType> fmt::Debug for CString<N, LenT> {
325+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
326+
self.as_c_str().fmt(f)
327+
}
328+
}
329+
324330
/// An error to extend [`CString`] with bytes.
325331
#[derive(Debug)]
326332
pub enum ExtendError {

0 commit comments

Comments
 (0)