summaryrefslogtreecommitdiffstats
path: root/sq
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-09-21 15:21:15 +0300
committerLars Wirzenius <liw@sequoia-pgp.org>2021-09-30 08:31:01 +0300
commit6b0a74801c45304fe8c9891a5addae03b56a0420 (patch)
treeb97b158749069cfa82671a0e57bf0d5a25641298 /sq
parent4aa321484012541367d1a490375fe58ccdce44a4 (diff)
Use .is_empty() for clarity, instead of .len() == 0
This was found by clippy lint len_zero: https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Diffstat (limited to 'sq')
-rw-r--r--sq/src/commands/key.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/sq/src/commands/key.rs b/sq/src/commands/key.rs
index c48d574d..a6562ef5 100644
--- a/sq/src/commands/key.rs
+++ b/sq/src/commands/key.rs
@@ -243,7 +243,7 @@ fn password(config: Config, m: &ArgMatches) -> Result<()> {
return Err(anyhow::anyhow!("Passwords do not match"));
}
- if prompt_0.len() == 0 {
+ if prompt_0.is_empty() {
// Empty password means no password.
None
} else {