`SmallString<SIZE>`: Added `fmt::Display` impl

Fortune for stack-str's current commit: Curse − 凶
master
Avril 3 years ago
parent 99ada01140
commit ffd3518556
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -310,3 +310,14 @@ impl<const SIZE: usize> std::str::FromStr for SmallString<SIZE>
Ok(Self{inner}) Ok(Self{inner})
} }
} }
impl<const SIZE: usize> fmt::Display for SmallString<SIZE>
{
#[inline]
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
{
f.write_str(self.as_str())
}
}
//TODO: SmallString: fmt::Write, io::Write impls when extending functions have been written

Loading…
Cancel
Save