diff --git a/libraries/persistent_store/src/storage.rs b/libraries/persistent_store/src/storage.rs index d0a0659..473965b 100644 --- a/libraries/persistent_store/src/storage.rs +++ b/libraries/persistent_store/src/storage.rs @@ -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 for StorageError { - fn from(error: std::io::Error) -> Self { - Self::IOError + fn from(_: std::io::Error) -> Self { + Self::CustomError } } diff --git a/libraries/persistent_store/src/store.rs b/libraries/persistent_store/src/store.rs index ebaf806..b946878 100644 --- a/libraries/persistent_store/src/store.rs +++ b/libraries/persistent_store/src/store.rs @@ -72,8 +72,6 @@ impl From for StoreError { fn from(error: StorageError) -> StoreError { match error { StorageError::CustomError => StoreError::StorageError, - #[cfg(feature = "hostenv")] - StorageError::IOError => StoreError::StorageError, // The store always calls the storage correctly. StorageError::NotAligned | StorageError::OutOfBounds => unreachable!(), }