about summary refs log tree commit diff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/tazjin/german-string/src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/users/tazjin/german-string/src/lib.rs b/users/tazjin/german-string/src/lib.rs
index cf315c9d5dce..380ca4ed626c 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::*;