From 6c039cd319f15a8b5fbf771729589764be83a29d Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 18 Apr 2020 01:38:49 -0400 Subject: don't use locked vecs for pwgen i'm doing all of my password generation in the client, which really doesn't need it --- src/bin/rbw/commands.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/bin/rbw/commands.rs') 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()?; -- cgit v1.2.3-54-g00ecf