simplify the implementation of scan (#45)
This commit is contained in:
@@ -152,8 +152,7 @@ impl MemTable {
|
|||||||
item: (KeyBytes::new(), Bytes::new()),
|
item: (KeyBytes::new(), Bytes::new()),
|
||||||
}
|
}
|
||||||
.build();
|
.build();
|
||||||
let entry = iter.with_iter_mut(|iter| MemTableIterator::entry_to_item(iter.next()));
|
iter.next().unwrap();
|
||||||
iter.with_mut(|x| *x.item = entry);
|
|
||||||
iter
|
iter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -119,8 +119,7 @@ impl MemTable {
|
|||||||
item: (Bytes::new(), Bytes::new()),
|
item: (Bytes::new(), Bytes::new()),
|
||||||
}
|
}
|
||||||
.build();
|
.build();
|
||||||
let entry = iter.with_iter_mut(|iter| MemTableIterator::entry_to_item(iter.next()));
|
iter.next().unwrap();
|
||||||
iter.with_mut(|x| *x.item = entry);
|
|
||||||
iter
|
iter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user