Lints
This commit is contained in:
parent
7541b2f493
commit
f67501d0f9
7 changed files with 8 additions and 8 deletions
|
@ -67,7 +67,7 @@ impl TestCard {
|
|||
let ard = ca.get_app_data()?;
|
||||
let app_id = CardApp::get_aid(&ard)?;
|
||||
|
||||
if &app_id.ident().as_str() == ident {
|
||||
if app_id.ident().as_str() == ident {
|
||||
ca.init_caps(&ard)?;
|
||||
|
||||
// println!("opened pcsc card {}", ident);
|
||||
|
|
|
@ -108,7 +108,7 @@ impl<'a> crypto::Decryptor for CardDecryptor<'a> {
|
|||
DecryptMe::ECDH(&e.value()[1..])
|
||||
} else {
|
||||
// NIST curves: ephemeral key with header byte
|
||||
DecryptMe::ECDH(&e.value())
|
||||
DecryptMe::ECDH(e.value())
|
||||
};
|
||||
|
||||
// Decryption operation on the card
|
||||
|
|
|
@ -211,7 +211,7 @@ impl EccKey for SqEccKey {
|
|||
}
|
||||
|
||||
fn get_scalar(&self) -> &[u8] {
|
||||
&self.scalar.value()
|
||||
self.scalar.value()
|
||||
}
|
||||
|
||||
fn get_type(&self) -> EccType {
|
||||
|
|
|
@ -54,7 +54,7 @@ impl CardApp {
|
|||
let mut ext_support = false;
|
||||
let mut chaining_support = false;
|
||||
|
||||
if let Ok(hist) = CardApp::get_historical(&ard) {
|
||||
if let Ok(hist) = CardApp::get_historical(ard) {
|
||||
if let Some(cc) = hist.get_card_capabilities() {
|
||||
chaining_support = cc.get_command_chaining();
|
||||
ext_support = cc.get_extended_lc_le();
|
||||
|
@ -62,7 +62,7 @@ impl CardApp {
|
|||
}
|
||||
|
||||
let (max_cmd_bytes, max_rsp_bytes) = if let Ok(Some(eli)) =
|
||||
CardApp::get_extended_length_information(&ard)
|
||||
CardApp::get_extended_length_information(ard)
|
||||
{
|
||||
(eli.max_command_bytes, eli.max_response_bytes)
|
||||
} else {
|
||||
|
|
|
@ -20,7 +20,7 @@ impl TryFrom<&[u8]> for CardHolder {
|
|||
type Error = anyhow::Error;
|
||||
|
||||
fn try_from(data: &[u8]) -> Result<Self> {
|
||||
let entry = TlvEntry::from(&data, true)?;
|
||||
let entry = TlvEntry::from(data, true)?;
|
||||
let tlv = Tlv(Tag(vec![0x65]), entry);
|
||||
|
||||
let name: Option<String> = tlv
|
||||
|
|
|
@ -83,7 +83,7 @@ impl TlvEntry {
|
|||
let mut input = data;
|
||||
|
||||
while !input.is_empty() {
|
||||
let (rest, tlv) = Tlv::parse(&input)?;
|
||||
let (rest, tlv) = Tlv::parse(input)?;
|
||||
input = rest;
|
||||
c.push(tlv);
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ impl ScdClient {
|
|||
fn init(&mut self) -> Result<()> {
|
||||
let mut rt = RT.lock().unwrap();
|
||||
|
||||
let send = format!("SCD SERIALNO");
|
||||
let send = "SCD SERIALNO";
|
||||
self.agent.send(send)?;
|
||||
|
||||
while let Some(response) = rt.block_on(self.agent.next()) {
|
||||
|
|
Loading…
Reference in a new issue