add version to interfaces

This commit is contained in:
vms
2021-03-15 12:37:15 +03:00
parent f6fdc50e75
commit 5758fa66c6
8 changed files with 133 additions and 18 deletions

View File

@ -72,13 +72,7 @@ where
W: Write,
{
fn to_bytes(&self, writer: &mut W) -> io::Result<()> {
// Size first.
writer.write_all(&[self.len() as u8])?;
// Then the string.
writer.write_all(self.as_bytes())?;
Ok(())
self.as_str().to_bytes(writer)
}
}