Skip to content

Commit

Permalink
simplify the implementation of scan (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
letterbeezps authored Feb 11, 2024
1 parent 2077c15 commit 1aa53aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions mini-lsm-mvcc/src/mem_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ impl MemTable {
item: (KeyBytes::new(), Bytes::new()),
}
.build();
let entry = iter.with_iter_mut(|iter| MemTableIterator::entry_to_item(iter.next()));
iter.with_mut(|x| *x.item = entry);
iter.next().unwrap();
iter
}

Expand Down
3 changes: 1 addition & 2 deletions mini-lsm/src/mem_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ impl MemTable {
item: (Bytes::new(), Bytes::new()),
}
.build();
let entry = iter.with_iter_mut(|iter| MemTableIterator::entry_to_item(iter.next()));
iter.with_mut(|x| *x.item = entry);
iter.next().unwrap();
iter
}

Expand Down

0 comments on commit 1aa53aa

Please sign in to comment.