aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/rbw/commands.rs
diff options
context:
space:
mode:
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()?;