impl Write for FixedVec<?,u8>

This commit is contained in:
2024-10-12 02:50:37 -04:00
parent ec87c5398d
commit 6f440589dc

View File

@@ -111,3 +111,10 @@ impl<const MAX_LEN: usize, T> Drop for FixedVec<MAX_LEN, T> {
}
}
}
impl<const MAX_LEN: usize> core::fmt::Write for FixedVec<MAX_LEN, u8> {
fn write_str(&mut self, s: &str) -> core::fmt::Result {
self.extend(s.as_bytes().iter().cloned());
Ok(())
}
}