aboutsummaryrefslogtreecommitdiffstats
path: root/src/pinentry.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-04-06 21:42:35 -0400
committerJesse Luehrs <doy@tozt.net>2020-04-06 21:42:35 -0400
commit8b655f36b868cb023dcdd1ff712de80a59ccbdb1 (patch)
treedce0912bb14147346ee0fa35f1b971f6364a51bc /src/pinentry.rs
parentca02ec8ca2b24ae7997de80b662cfd3635d75e9e (diff)
downloadrbw-8b655f36b868cb023dcdd1ff712de80a59ccbdb1.tar.gz
rbw-8b655f36b868cb023dcdd1ff712de80a59ccbdb1.zip
clippy
Diffstat (limited to 'src/pinentry.rs')
-rw-r--r--src/pinentry.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pinentry.rs b/src/pinentry.rs
index aced54f..ff778e7 100644
--- a/src/pinentry.rs
+++ b/src/pinentry.rs
@@ -47,10 +47,10 @@ pub async fn getpin(
crate::error::FailedToParsePinentryUtf8 { out: out.clone() },
)?;
for line in out_str.lines() {
- if line.starts_with("OK") {
- continue;
- } else if line.starts_with("D ") {
+ if line.starts_with("D ") {
return Ok(line[2..line.len()].to_string());
+ } else if !line.starts_with("OK") {
+ break;
}
}