There was an error while loading. Please reload this page.
1 parent a08aebe commit 9c99093Copy full SHA for 9c99093
src/data_types/owned_strs.rs
@@ -2,6 +2,7 @@ use super::chars::{Char16, NUL_16};
2
use super::strs::CStr16;
3
use crate::alloc_api::vec::Vec;
4
use core::convert::TryFrom;
5
+use core::fmt;
6
use core::ops;
7
8
/// Error returned by [`CString16::try_from::<&str>`].
@@ -71,6 +72,12 @@ impl AsRef<CStr16> for CString16 {
71
72
}
73
74
75
+impl fmt::Display for CString16 {
76
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
77
+ self.as_ref().fmt(f)
78
+ }
79
+}
80
+
81
#[cfg(test)]
82
mod tests {
83
use super::*;
0 commit comments