lints
This commit is contained in:
parent
e01c79e857
commit
265587252a
2 changed files with 3 additions and 7 deletions
|
@ -342,7 +342,7 @@ pub fn test_set_user_data(
|
|||
// read all the fields back again, expect equal data
|
||||
let ch = card_tx.cardholder_related_data()?;
|
||||
|
||||
assert_eq!(ch.name().as_deref(), Some("Bar<<Foo".as_bytes()));
|
||||
assert_eq!(ch.name(), Some("Bar<<Foo".as_bytes()));
|
||||
assert_eq!(
|
||||
ch.lang().expect("Language setting is None"),
|
||||
&[['d', 'e'].into(), ['e', 'n'].into()]
|
||||
|
@ -519,10 +519,7 @@ pub fn test_verify(
|
|||
card_tx.set_name(b"Admin<<Hello")?;
|
||||
|
||||
let cardholder = card_tx.cardholder_related_data()?;
|
||||
assert_eq!(
|
||||
cardholder.name().as_deref(),
|
||||
Some("Admin<<Hello".as_bytes())
|
||||
);
|
||||
assert_eq!(cardholder.name(), Some("Admin<<Hello".as_bytes()));
|
||||
|
||||
card_tx.verify_pw1("123456")?;
|
||||
|
||||
|
|
|
@ -16,8 +16,7 @@ pub(crate) fn cards() -> Result<Vec<Box<dyn CardBackend>>, Error> {
|
|||
}
|
||||
|
||||
pub(crate) fn open_card(ident: &str) -> Result<Box<dyn CardBackend>, Error> {
|
||||
PcscCard::open_by_ident(ident, None)
|
||||
.map(|pc| Box::new(pc) as Box<dyn CardBackend>)
|
||||
PcscCard::open_by_ident(ident, None).map(Into::into)
|
||||
}
|
||||
|
||||
pub(crate) fn verify_to_user<'app, 'open>(
|
||||
|
|
Loading…
Reference in a new issue