aboutsummaryrefslogtreecommitdiff
path: root/src/util.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.rs')
-rw-r--r--src/util.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.rs b/src/util.rs
index 3b9904f..2738fce 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -5,7 +5,7 @@ use libc::{c_void, free};
use rand_core::RngCore;
use rand_os::OsRng;
-use crate::error::{CommandError, Error};
+use crate::error::{CommandError, Error, LibraryError};
/// Log level for libnitrokey.
///
@@ -78,7 +78,7 @@ pub fn generate_password(length: usize) -> Result<Vec<u8>, Error> {
}
pub fn get_cstring<T: Into<Vec<u8>>>(s: T) -> Result<CString, Error> {
- CString::new(s).or(Err(CommandError::InvalidString.into()))
+ CString::new(s).or(Err(LibraryError::InvalidString.into()))
}
impl Into<i32> for LogLevel {