diff --git a/src/lib.rs b/src/lib.rs index 4e13d35..a738ad6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -473,28 +473,28 @@ impl AsRef for StrBuf { } } -impl core::fmt::Write for StrBuf { +impl fmt::Write for StrBuf { #[inline(always)] - fn write_str(&mut self, s: &str) -> core::fmt::Result { + fn write_str(&mut self, s: &str) -> fmt::Result { if self.push_str(s) == s.len() { Ok(()) } else { - Err(core::fmt::Error) + Err(fmt::Error) } } } -impl core::fmt::Display for StrBuf { +impl fmt::Display for StrBuf { #[inline(always)] - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.write_str(self.as_str()) + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fmt::Display::fmt(self.as_str(), fmt) } } -impl core::fmt::Debug for StrBuf { +impl fmt::Debug for StrBuf { #[inline(always)] - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.write_str(self.as_str()) + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fmt::Debug::fmt(self.as_str(), fmt) } }