diff options
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs index 9cbbd4f7..8b2fc419 100644 --- a/src/error.rs +++ b/src/error.rs @@ -54,3 +54,12 @@ impl Error { } } } + +impl From<sled::TransactionError<Error>> for Error { + fn from(e: sled::TransactionError<Error>) -> Error { + match e { + sled::TransactionError::Abort(x) => x, + sled::TransactionError::Storage(x) => Error::Sled(x), + } + } +} |