Simplify conversion on iterator item (#364)

master
zhangsoledad 5 years ago committed by Oleksandr Anyshchenko
parent 811933be96
commit 0c355225fa
  1. 4
      src/db.rs

@ -609,8 +609,8 @@ impl<'a> Iterator for DBIterator<'a> {
if self.raw.valid() { if self.raw.valid() {
// .key() and .value() only ever return None if valid == false, which we've just cheked // .key() and .value() only ever return None if valid == false, which we've just cheked
Some(( Some((
self.raw.key().unwrap().to_vec().into_boxed_slice(), Box::from(self.raw.key().unwrap()),
self.raw.value().unwrap().to_vec().into_boxed_slice(), Box::from(self.raw.value().unwrap()),
)) ))
} else { } else {
None None

Loading…
Cancel
Save