diff --git a/src/array_string.rs b/src/array_string.rs index 90cfc09..692f679 100644 --- a/src/array_string.rs +++ b/src/array_string.rs @@ -5,6 +5,7 @@ use std::fmt; use std::hash::{Hash, Hasher}; use std::mem::MaybeUninit; use std::ops::{Deref, DerefMut}; +use std::path::Path; use std::ptr; use std::slice; use std::str; @@ -498,6 +499,12 @@ impl fmt::Debug for ArrayString fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { (**self).fmt(f) } } +impl AsRef for ArrayString { + fn as_ref(&self) -> &Path { + self.as_str().as_ref() + } +} + impl fmt::Display for ArrayString { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { (**self).fmt(f) }