From d9725bcff92f83e3b350db42c3aaab235234f211 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Sun, 5 Mar 2017 17:30:29 +0000 Subject: [PATCH] Allow DBIterator to be converted into DBRawIterator --- src/db.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/db.rs b/src/db.rs index 99f33f2..d65896e 100644 --- a/src/db.rs +++ b/src/db.rs @@ -514,6 +514,12 @@ impl Iterator for DBIterator { } } +impl Into for DBIterator { + fn into(self) -> DBRawIterator { + self.raw + } +} + impl<'a> Snapshot<'a> { pub fn new(db: &DB) -> Snapshot { let snapshot = unsafe { ffi::rocksdb_create_snapshot(db.inner) };