Remove dead code

This commit is contained in:
moznion
2020-11-28 15:27:07 +09:00
parent 89f36717e5
commit 4b7eb55c10

View File

@@ -77,20 +77,6 @@ impl Attributes {
.collect()
}
pub fn attributes_encoded_len(&self) -> Result<u16, String> {
let mut n: u16 = 0;
for attr in &self.0 {
let attr_len = attr.attribute.0.len();
if attr_len > 253 {
return Err("attribute is too large".to_owned());
}
n += 2 + (attr_len as u16);
}
Ok(n)
}
pub fn encode(&self) -> Result<Vec<u8>, String> {
let mut encoded: Vec<u8> = Vec::new();