From f40f2ffbfb6645a3fb777b2120e3b6e9e74250bc Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Sun, 25 Dec 2022 13:09:20 +0100 Subject: [PATCH] clippy: new lints --- openpgp-card-sequoia/examples/test.rs | 16 ++++++++-------- openpgp-card/src/card_do/pw_status.rs | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/openpgp-card-sequoia/examples/test.rs b/openpgp-card-sequoia/examples/test.rs index d6bf652..5cf47fa 100644 --- a/openpgp-card-sequoia/examples/test.rs +++ b/openpgp-card-sequoia/examples/test.rs @@ -103,17 +103,17 @@ fn main() -> Result<(), Box> { println!(); - let res = admin.set_name("Bar< Vec { let mut data = vec![]; - data.push(if self.pw1_cds_valid_once { 0 } else { 1 }); + // 0 if "valid once", 1 otherwise + data.push(u8::from(!self.pw1_cds_valid_once)); if long { let mut b2 = self.pw1_len_format;