diff --git a/src/rocksdb.rs b/src/rocksdb.rs index cbb69a9..248957c 100644 --- a/src/rocksdb.rs +++ b/src/rocksdb.rs @@ -14,6 +14,7 @@ // use std::collections::BTreeMap; +use std::error; use std::ffi::CString; use std::fmt; use std::fs; @@ -117,6 +118,12 @@ impl From for String { } } +impl error::Error for Error { + fn description(&self) -> &str { + &self.message + } +} + impl fmt::Display for Error { fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> { self.message.fmt(formatter)