diff --git a/CHANGELOG.md b/CHANGELOG.md index 403ca01e..9bd1557a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -111,6 +111,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - `ufmt-impl` is now `ufmt` - `cas` is removed, atomic polyfilling is now opt-in via the `portable-atomic` feature. - `Vec::as_mut_slice` is now a public method. +- `ufmt` functions are annotated with `inline`. ### Fixed diff --git a/src/ufmt.rs b/src/ufmt.rs index 6f0929b1..ef6e36ab 100644 --- a/src/ufmt.rs +++ b/src/ufmt.rs @@ -7,6 +7,7 @@ use ufmt::uDisplay; use ufmt_write::uWrite; impl uDisplay for StringInner { + #[inline] fn fmt(&self, f: &mut ufmt::Formatter<'_, W>) -> Result<(), W::Error> where W: uWrite + ?Sized, @@ -17,6 +18,7 @@ impl uDisplay for StringInner { impl uWrite for StringInner { type Error = CapacityError; + #[inline] fn write_str(&mut self, s: &str) -> Result<(), Self::Error> { self.push_str(s) } @@ -24,6 +26,7 @@ impl uWrite for StringInner { impl + ?Sized> uWrite for VecInner { type Error = CapacityError; + #[inline] fn write_str(&mut self, s: &str) -> Result<(), Self::Error> { self.extend_from_slice(s.as_bytes()) }