Implement Display for Chunk

This commit is contained in:
lumi 2025-06-23 09:33:03 +10:00
parent 7c5ea599c8
commit e801ee468b
Signed by: luaneko
GPG Key ID: 406809B8763FF07A

View File

@ -357,6 +357,12 @@ impl DerefMut for Chunk {
}
}
impl fmt::Display for Chunk {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.content)
}
}
impl<T: Into<BString>> From<T> for Chunk {
fn from(value: T) -> Self {
Self::new(value)