aboutsummaryrefslogtreecommitdiff
path: root/src/util.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.rs')
-rw-r--r--src/util.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.rs b/src/util.rs
index 8855275..06bb854 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -71,7 +71,7 @@ pub fn get_last_error() -> Error {
}
pub fn generate_password(length: usize) -> Result<Vec<u8>, Error> {
- let mut rng = OsRng::new().map_err(CommandError::from)?;
+ let mut rng = OsRng::new()?;
let mut data = vec![0u8; length];
rng.fill_bytes(&mut data[..]);
Ok(data)