Clean up and lay groundwork for challange 32

This commit is contained in:
2022-08-28 15:53:23 -04:00
parent 75d4b97524
commit f50197e480
6 changed files with 111 additions and 92 deletions

View File

@@ -19,10 +19,6 @@ impl Bytes {
String::from(std::str::from_utf8(v).unwrap())
}
pub fn to_sub_utf8(&self, length: usize) -> String {
Bytes(self.0[..length].to_vec()).to_utf8()
}
pub fn len(&self) -> usize {
self.0.len()
}