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
+12
View File
@@ -164,6 +164,18 @@ impl Display for Error {
}
}
impl From<std::array::TryFromSliceError> for Error {
fn from(_: std::array::TryFromSliceError) -> Error {
Error::SizeError
}
}
impl From<std::time::SystemTimeError> for Error {
fn from(_: std::time::SystemTimeError) -> Error {
Error::GenericError
}
}
impl From<pcsc::Error> for Error {
fn from(err: pcsc::Error) -> Error {
Error::PcscError { inner: Some(err) }