feat(tvix/store): impl From<PoisonError> for Error
Change-Id: Ib61e276b45c0102e383a7e7e641172b151369b03 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8207 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
786854713c
commit
3f27fe3484
1 changed files with 7 additions and 0 deletions
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue