Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sosthene-nitrokey committed Jan 3, 2023
1 parent 27d3610 commit a7bb1e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/tlv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub fn take_len(data: &[u8]) -> Option<(usize, &[u8])> {
let l2 = *data.get(1)?;
let l3 = *data.get(2)?;
let len = u16::from_be_bytes([l2, l3]) as usize;
Some((len as usize, &data[3..]))
Some((len, &data[3..]))
}
}

Expand Down
4 changes: 2 additions & 2 deletions tests/command-response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ impl Default for OutputMatcher {

fn parse_hex(data: &str) -> Vec<u8> {
let tmp: String = data.split_whitespace().collect();
hex::decode(&tmp).unwrap()
hex::decode(tmp).unwrap()
}

impl OutputMatcher {
Expand Down Expand Up @@ -417,7 +417,7 @@ impl IoCmd {
println!("Command: {:x?}", input);
let mut rep: heapless::Vec<u8, 1024> = heapless::Vec::new();
let cmd: iso7816::Command<1024> = iso7816::Command::try_from(input).unwrap_or_else(|err| {
panic!("Bad command: {err:?}, for command: {}", hex::encode(&input))
panic!("Bad command: {err:?}, for command: {}", hex::encode(input))
});
let status: Status = card
.handle(&cmd, &mut rep)
Expand Down

0 comments on commit a7bb1e9

Please sign in to comment.