Add clippy::unwrap_used lint (#515)

Lints for usages of `unwrap()` in the `yubikey` crate (not CLI yet).

Replaces them with `?` or `expect()` as the situation warrants.
This commit is contained in:
Tony Arcieri (iqlusion)
2023-08-15 17:02:25 -07:00
committed by GitHub
parent d226209ea4
commit 78313360a1
11 changed files with 65 additions and 51 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ impl Config {
error!("pin timestamp in admin metadata is an invalid size");
} else {
// TODO(tarcieri): double-check endianness is correct
let pin_last_changed = u32::from_le_bytes(item.try_into().unwrap());
let pin_last_changed = u32::from_le_bytes([item[0], item[1], item[2], item[3]]);
if pin_last_changed != 0 {
config.pin_last_changed =