diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | src/error.rs | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index dddccb1..651a50e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ SPDX-License-Identifier: CC0-1.0 # Unreleased - Refactor the `Error` enum so that it is `Send`, `Sync` and `'static`: - Remove the `sync::PoisonError` from the `PoisonError` variant. + - Remove `Error::RandError` variant. # v0.6.0 (2020-02-03) - Add `String` value to the `Error::UnexpectedError` variant. diff --git a/src/error.rs b/src/error.rs index e0698a2..995741b 100644 --- a/src/error.rs +++ b/src/error.rs @@ -22,8 +22,6 @@ pub enum Error { LibraryError(LibraryError), /// An error that occurred due to a poisoned lock. PoisonError, - /// An error that occurred during random number generation. - RandError(Box<dyn error::Error>), /// An error that is caused by an unexpected value returned by libnitrokey. UnexpectedError(String), /// An unknown error returned by libnitrokey. @@ -101,7 +99,6 @@ impl error::Error for Error { Error::ConcurrentAccessError => None, Error::LibraryError(ref err) => Some(err), Error::PoisonError => None, - Error::RandError(ref err) => Some(err.as_ref()), Error::UnexpectedError(_) => None, Error::UnknownError(_) => None, Error::UnsupportedModelError => None, @@ -118,7 +115,6 @@ impl fmt::Display for Error { Error::ConcurrentAccessError => write!(f, "Internal error: concurrent access"), Error::LibraryError(ref err) => write!(f, "Library error: {}", err), Error::PoisonError => write!(f, "Internal error: poisoned lock"), - Error::RandError(ref err) => write!(f, "RNG error: {}", err), Error::UnexpectedError(ref s) => write!(f, "An unexpected error occurred: {}", s), Error::UnknownError(ref err) => write!(f, "Unknown error: {}", err), Error::UnsupportedModelError => write!(f, "Unsupported Nitrokey model"), |