diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-04-06 21:42:35 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-04-06 21:42:35 -0400 |
commit | 8b655f36b868cb023dcdd1ff712de80a59ccbdb1 (patch) | |
tree | dce0912bb14147346ee0fa35f1b971f6364a51bc /src/pinentry.rs | |
parent | ca02ec8ca2b24ae7997de80b662cfd3635d75e9e (diff) | |
download | rbw-8b655f36b868cb023dcdd1ff712de80a59ccbdb1.tar.gz rbw-8b655f36b868cb023dcdd1ff712de80a59ccbdb1.zip |
clippy
Diffstat (limited to 'src/pinentry.rs')
-rw-r--r-- | src/pinentry.rs | 6 |
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; } } |