aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/error.rs4
-rw-r--r--src/lib.rs4
2 files changed, 2 insertions, 6 deletions
diff --git a/src/error.rs b/src/error.rs
index 1b36975..5c8c52e 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -4,7 +4,6 @@
use std::error;
use std::fmt;
use std::os::raw;
-use std::result;
use std::str;
use crate::device;
@@ -100,9 +99,6 @@ impl fmt::Display for Error {
}
}
-/// A result returned by the nitrokey crate.
-pub type Result<T> = result::Result<T, Error>;
-
/// An error reported by the Nitrokey device in the response packet.
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CommandError {
diff --git a/src/lib.rs b/src/lib.rs
index 9d15d03..18c86e2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -107,7 +107,7 @@ pub use crate::device::{
connect, connect_model, Device, DeviceWrapper, Model, Pro, SdCardData, Storage,
StorageProductionInfo, StorageStatus, VolumeMode, VolumeStatus,
};
-pub use crate::error::{CommandError, CommunicationError, Error, LibraryError, Result};
+pub use crate::error::{CommandError, CommunicationError, Error, LibraryError};
pub use crate::otp::{ConfigureOtp, GenerateOtp, OtpMode, OtpSlotData};
pub use crate::pws::{GetPasswordSafe, PasswordSafe, SLOT_COUNT};
pub use crate::util::LogLevel;
@@ -186,7 +186,7 @@ pub fn set_log_level(level: LogLevel) {
/// ```
///
/// [`Utf8Error`]: enum.Error.html#variant.Utf8Error
-pub fn get_library_version() -> Result<Version> {
+pub fn get_library_version() -> Result<Version, Error> {
// NK_get_library_version returns a static string, so we don’t have to free the pointer.
let git = unsafe { nitrokey_sys::NK_get_library_version() };
let git = if git.is_null() {