Remove dead code in Rocks wrapper (#6469)

automerge
This commit is contained in:
Greg Fitzgerald 2019-10-21 11:18:54 -06:00 committed by Grimes
parent dec9272813
commit 48eafcc74f
1 changed files with 1 additions and 18 deletions

View File

@ -71,7 +71,7 @@ pub mod columns {
}
#[derive(Debug)]
pub struct Rocks(rocksdb::DB);
struct Rocks(rocksdb::DB);
impl Rocks {
fn open(path: &Path) -> Result<Rocks> {
@ -212,11 +212,6 @@ pub trait Column {
fn as_index(slot: Slot) -> Self::Index;
}
pub trait IWriteBatch {
fn put_cf(&mut self, cf: ColumnFamily, key: &[u8], value: &[u8]) -> Result<()>;
fn delete_cf(&mut self, cf: ColumnFamily, key: &[u8]) -> Result<()>;
}
pub trait TypedColumn: Column {
type Type: Serialize + DeserializeOwned;
}
@ -742,18 +737,6 @@ impl WriteBatch {
}
}
impl IWriteBatch for RWriteBatch {
fn put_cf(&mut self, cf: ColumnFamily, key: &[u8], value: &[u8]) -> Result<()> {
RWriteBatch::put_cf(self, cf, key, value)?;
Ok(())
}
fn delete_cf(&mut self, cf: ColumnFamily, key: &[u8]) -> Result<()> {
RWriteBatch::delete_cf(self, cf, key)?;
Ok(())
}
}
impl std::convert::From<rocksdb::Error> for BlocktreeError {
fn from(e: rocksdb::Error) -> BlocktreeError {
BlocktreeError::RocksDb(e)