feat(code): map + unwrap_or -> map_or (#13)
This commit is contained in:
@@ -140,8 +140,7 @@ impl SsTable {
|
|||||||
let offset_end = self
|
let offset_end = self
|
||||||
.block_metas
|
.block_metas
|
||||||
.get(block_idx + 1)
|
.get(block_idx + 1)
|
||||||
.map(|x| x.offset)
|
.map_or(self.block_meta_offset, |x| x.offset);
|
||||||
.unwrap_or(self.block_meta_offset);
|
|
||||||
let block_data = self
|
let block_data = self
|
||||||
.file
|
.file
|
||||||
.read(offset as u64, (offset_end - offset) as u64)?;
|
.read(offset as u64, (offset_end - offset) as u64)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user