clippy: new lints
This commit is contained in:
parent
49b2e95f56
commit
f40f2ffbfb
2 changed files with 10 additions and 9 deletions
|
@ -103,17 +103,17 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||||
|
|
||||||
println!();
|
println!();
|
||||||
|
|
||||||
let res = admin.set_name("Bar<<Foo")?;
|
admin.set_name("Bar<<Foo")?;
|
||||||
println!("set name {:x?}", res);
|
println!("set name - ok");
|
||||||
|
|
||||||
let res = admin.set_sex(Sex::NotApplicable)?;
|
admin.set_sex(Sex::NotApplicable)?;
|
||||||
println!("set sex {:x?}", res);
|
println!("set sex - ok");
|
||||||
|
|
||||||
let res = admin.set_lang(&[['e', 'n'].into()])?;
|
admin.set_lang(&[['e', 'n'].into()])?;
|
||||||
println!("set lang {:x?}", res);
|
println!("set lang - ok");
|
||||||
|
|
||||||
let res = admin.set_url("https://keys.openpgp.org")?;
|
admin.set_url("https://keys.openpgp.org")?;
|
||||||
println!("set url {:x?}", res);
|
println!("set url - ok");
|
||||||
|
|
||||||
let cert = Cert::from_file(TEST_KEY_PATH)?;
|
let cert = Cert::from_file(TEST_KEY_PATH)?;
|
||||||
let p = StandardPolicy::new();
|
let p = StandardPolicy::new();
|
||||||
|
|
|
@ -17,7 +17,8 @@ impl PWStatusBytes {
|
||||||
pub(crate) fn serialize_for_put(&self, long: bool) -> Vec<u8> {
|
pub(crate) fn serialize_for_put(&self, long: bool) -> Vec<u8> {
|
||||||
let mut data = 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 {
|
if long {
|
||||||
let mut b2 = self.pw1_len_format;
|
let mut b2 = self.pw1_len_format;
|
||||||
|
|
Loading…
Reference in a new issue