fix: remove unwrap

This commit is contained in:
Etienne Prothon committed 2020-07-15 16:39:00 +02:00
1 parent 9f4873bae8
commit 9edc0e656e
1 file changed
+2 -2
+2 -2
View File
@@ -200,8 +200,8 @@ impl Entry {
} }
if n <= 4 { if n <= 4 {
let mut buf = vec![0; n]; let mut buf = vec![0; n];
self.r(bo).read_exact(&mut buf ).unwrap(); self.r(bo).read_exact(&mut buf )?;
let v = String::from_utf8(buf).unwrap(); let v = String::from_utf8(buf)?;
let v = v.trim_matches(char::from(0)); let v = v.trim_matches(char::from(0));
Ok(Ascii(v.into())) Ok(Ascii(v.into()))
} else { } else {