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
@@ -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) }
|
||||
|
||||
Reference in New Issue
Block a user