about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-03-03T21·32+0100
committerflokli <flokli@flokli.de>2023-03-06T15·32+0000
commit3f27fe34843357e8782ae3357ab1f7ed272ccfca (patch)
tree3cdc469b16deecef958bf71dfdc786f3f4e73396 /tvix
parent786854713c3d5d80cd8ededc857151ac65b54dbd (diff)
feat(tvix/store): impl From<PoisonError> for Error r/5892
Change-Id: Ib61e276b45c0102e383a7e7e641172b151369b03
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8207
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix')
-rw-r--r--tvix/store/src/errors.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tvix/store/src/errors.rs b/tvix/store/src/errors.rs
index 003c619b7213..7f7474428400 100644
--- a/tvix/store/src/errors.rs
+++ b/tvix/store/src/errors.rs
@@ -1,3 +1,4 @@
+use std::sync::PoisonError;
 use thiserror::Error;
 
 /// Errors related to communication with the store.
@@ -9,3 +10,9 @@ pub enum Error {
     #[error("internal storage error: {0}")]
     StorageError(String),
 }
+
+impl<T> From<PoisonError<T>> for Error {
+    fn from(value: PoisonError<T>) -> Self {
+        Error::StorageError(value.to_string())
+    }
+}