Clean up and lay groundwork for challange 32
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user