aboutsummaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-09 20:58:39 +0200
committerAlex Auvolat <alex@adnab.me>2020-04-09 20:58:39 +0200
commita3eb88e6013e70238e7ddd66b4644f138b3d1b93 (patch)
tree850f76d80d1a609d699040e651e569645604e6ab /src/error.rs
parent1d786c2c663ac6f6e3e3ef52accd6e9eca049988 (diff)
downloadgarage-a3eb88e6013e70238e7ddd66b4644f138b3d1b93.tar.gz
garage-a3eb88e6013e70238e7ddd66b4644f138b3d1b93.zip
Locally, transactions
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs9
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),
+ }
+ }
+}