diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-10-12 23:35:45 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-10-12 23:35:45 -0400 |
commit | 6c7dffa41b6eca2c8aac641c469f2f754c218548 (patch) | |
tree | b735740c60b007a962a55cca3a27891ea5f6566b /src/pinentry.rs | |
parent | d756b9a6dc4da4bdd889e5dc7c64c50d9d96cdd9 (diff) | |
download | rbw-6c7dffa41b6eca2c8aac641c469f2f754c218548.tar.gz rbw-6c7dffa41b6eca2c8aac641c469f2f754c218548.zip |
clippy
Diffstat (limited to 'src/pinentry.rs')
-rw-r--r-- | src/pinentry.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/pinentry.rs b/src/pinentry.rs index b03c94e..a4627c2 100644 --- a/src/pinentry.rs +++ b/src/pinentry.rs @@ -9,14 +9,13 @@ pub async fn getpin( tty: Option<&str>, ) -> Result<crate::locked::Password> { let mut opts = tokio::process::Command::new("pinentry"); - let opts = opts - .stdin(std::process::Stdio::piped()) + opts.stdin(std::process::Stdio::piped()) .stdout(std::process::Stdio::piped()); - let opts = if let Some(tty) = tty { - opts.args(&["-T", tty, "-o", "0"]) + if let Some(tty) = tty { + opts.args(&["-T", tty, "-o", "0"]); } else { - opts.args(&["-o", "0"]) - }; + opts.args(&["-o", "0"]); + } let mut child = opts.spawn().context(crate::error::Spawn)?; // unwrap is safe because we specified stdin as piped in the command opts // above |