Skip to content

Commit ffcbc63

Browse files
committed
aumap: remove unnecessary unwrap's
1 parent 4d0575d commit ffcbc63

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/providers/file/aumap.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ where
8888
let mut val_buf = [0u8; VAL_LEN];
8989
let mut cache = Vec::with_capacity(num_pages as usize);
9090
for _ in 0..num_pages {
91-
file.read_exact(&mut buf).unwrap();
91+
file.read_exact(&mut buf)?;
9292
let num_keys = u64::from_le_bytes(buf);
9393
let mut page = IndexMap::with_capacity(num_keys as usize);
9494
for _ in 0..num_keys {
95-
file.read_exact(&mut key_buf).unwrap();
96-
file.read_exact(&mut val_buf).unwrap();
95+
file.read_exact(&mut key_buf)?;
96+
file.read_exact(&mut val_buf)?;
9797
page.insert(key_buf, val_buf);
9898
}
9999
cache.push(page);

0 commit comments

Comments
 (0)