diff --git a/xous-rs/src/string.rs b/xous-rs/src/string.rs index f2c0f5c51..7be38f6f9 100644 --- a/xous-rs/src/string.rs +++ b/xous-rs/src/string.rs @@ -223,6 +223,12 @@ impl core::fmt::Debug for String { } } +impl core::convert::AsRef for String { + fn as_ref(&self) -> &str { + self.to_str() + } +} + #[repr(C)] pub struct ArchivedString { ptr: rkyv::RelPtr, @@ -296,4 +302,4 @@ impl Eq for String {} pub struct XousDeserializer; impl rkyv::Fallible for XousDeserializer { type Error = crate::Error; -} \ No newline at end of file +}