aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/error.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/error.rs b/src/error.rs
index 5c8c52e..1730171 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -22,7 +22,7 @@ pub enum Error {
/// An error that is caused by an unexpected value returned by libnitrokey.
UnexpectedError,
/// An unknown error returned by libnitrokey.
- Unknown(i64),
+ UnknownError(i64),
/// An error occurred when interpreting a UTF-8 string.
Utf8Error(str::Utf8Error),
}
@@ -36,7 +36,7 @@ impl From<raw::c_int> for Error {
} else if let Some(err) = LibraryError::try_from(code) {
Error::LibraryError(err)
} else {
- Error::Unknown(code.into())
+ Error::UnknownError(code.into())
}
}
}
@@ -79,7 +79,7 @@ impl error::Error for Error {
Error::LibraryError(ref err) => Some(err),
Error::RandError(ref err) => Some(err.as_ref()),
Error::UnexpectedError => None,
- Error::Unknown(_) => None,
+ Error::UnknownError(_) => None,
Error::Utf8Error(ref err) => Some(err),
}
}
@@ -93,7 +93,7 @@ impl fmt::Display for Error {
Error::LibraryError(ref err) => write!(f, "Library error: {}", err),
Error::RandError(ref err) => write!(f, "RNG error: {}", err),
Error::UnexpectedError => write!(f, "An unexpected error occurred"),
- Error::Unknown(ref err) => write!(f, "Unknown error: {}", err),
+ Error::UnknownError(ref err) => write!(f, "Unknown error: {}", err),
Error::Utf8Error(ref err) => write!(f, "UTF-8 error: {}", err),
}
}