about summary refs log tree commit diff
path: root/tvix/store/src/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/store/src/errors.rs')
-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())
+    }
+}