Use StorageError::CustomError for implementations-specific (I/O) errors
This commit is contained in:
@@ -34,17 +34,12 @@ pub enum StorageError {
|
||||
|
||||
/// Implementation-specific error.
|
||||
CustomError,
|
||||
|
||||
// I/O error
|
||||
#[cfg(feature = "hostenv")]
|
||||
IOError,
|
||||
}
|
||||
|
||||
#[cfg(feature = "hostenv")]
|
||||
#[allow(unused_variables)]
|
||||
#[cfg(feature = "std")]
|
||||
impl From<std::io::Error> for StorageError {
|
||||
fn from(error: std::io::Error) -> Self {
|
||||
Self::IOError
|
||||
fn from(_: std::io::Error) -> Self {
|
||||
Self::CustomError
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user