diff --git a/users/tazjin/german-string/src/lib.rs b/users/tazjin/german-string/src/lib.rs index cf315c9d5..380ca4ed6 100644 --- a/users/tazjin/german-string/src/lib.rs +++ b/users/tazjin/german-string/src/lib.rs @@ -1,4 +1,5 @@ use std::alloc::Layout; +use std::fmt::{Debug, Formatter}; #[derive(Clone, Copy)] #[repr(C)] @@ -116,6 +117,12 @@ impl PartialEq for GermanString { } } +impl Debug for GermanString { + fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { + String::from_utf8_lossy(self.as_bytes()).fmt(f) + } +} + #[cfg(test)] mod tests { use super::*;