mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
error: add From conversion for bincode::ErrorKind
This commit is contained in:
@@ -52,6 +52,8 @@ pub enum Error {
|
||||
TomlDeserializeError(#[from] toml::de::Error),
|
||||
#[error(transparent)]
|
||||
TomlSerializeError(#[from] toml::ser::Error),
|
||||
#[error("Bincode serialization error: `{0}`")]
|
||||
BincodeError(String),
|
||||
|
||||
/// Contract
|
||||
#[error("Bad variable ref type byte")]
|
||||
@@ -234,3 +236,9 @@ impl From<rusqlite::Error> for Error {
|
||||
Error::SqlxError(err.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Box<bincode::ErrorKind>> for Error {
|
||||
fn from(err: Box<bincode::ErrorKind>) -> Error {
|
||||
Error::BincodeError(err.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user