aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/rbw/commands.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-04-18 01:38:49 -0400
committerJesse Luehrs <doy@tozt.net>2020-04-18 01:58:08 -0400
commit6c039cd319f15a8b5fbf771729589764be83a29d (patch)
treea37f025c5053ec28c2131277a8728eea48b0a90b /src/bin/rbw/commands.rs
parent840f53b84206f9efe0a5cdea3414c472908a22e4 (diff)
downloadrbw-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.rs5
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()?;