aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.rs b/src/util.rs
index d87cd7c..b7e8cd3 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -80,7 +80,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(LibraryError::InvalidString.into()))
+ CString::new(s).or_else(|_| Err(LibraryError::InvalidString.into()))
}
impl Into<i32> for LogLevel {