diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-04-18 01:38:49 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-04-18 01:58:08 -0400 |
commit | 6c039cd319f15a8b5fbf771729589764be83a29d (patch) | |
tree | a37f025c5053ec28c2131277a8728eea48b0a90b /src/bin/rbw/commands.rs | |
parent | 840f53b84206f9efe0a5cdea3414c472908a22e4 (diff) | |
download | rbw-6c039cd319f15a8b5fbf771729589764be83a29d.tar.gz rbw-6c039cd319f15a8b5fbf771729589764be83a29d.zip |
don't use locked vecs for pwgen
i'm doing all of my password generation in the client, which really
doesn't need it
Diffstat (limited to 'src/bin/rbw/commands.rs')
-rw-r--r-- | src/bin/rbw/commands.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bin/rbw/commands.rs b/src/bin/rbw/commands.rs index 360c967..3e11c88 100644 --- a/src/bin/rbw/commands.rs +++ b/src/bin/rbw/commands.rs @@ -198,9 +198,8 @@ pub fn generate( len: usize, ty: rbw::pwgen::Type, ) -> anyhow::Result<()> { - let pw = rbw::pwgen::pwgen(ty, len); - // unwrap is safe because pwgen is guaranteed to always return valid utf8 - println!("{}", std::str::from_utf8(pw.data()).unwrap()); + let password = rbw::pwgen::pwgen(ty, len); + println!("{}", password); if name.is_some() && user.is_some() { unlock()?; |