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:
committed by
GitHub
parent
d226209ea4
commit
78313360a1
+1
-1
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user