Remove TxClient::tx() from API; clean up uses.

This commit is contained in:
Heiko Schaefer 2022-02-16 17:46:26 +01:00
parent dcf73bd86d
commit f1f4533332
No known key found for this signature in database
GPG key ID: 4A849A1904CCBD7D

View file

@ -97,7 +97,7 @@ impl<'b> TxClient<'b> {
TxClient::select(&mut txc)?;
}
tx = txc.tx();
tx = txc.tx;
}
let txc = Self {
@ -207,10 +207,6 @@ impl<'b> TxClient<'b> {
Err(anyhow!("card_caps is None"))
}
}
pub fn tx(self) -> Transaction<'b> {
self.tx
}
}
impl CardClient for TxClient<'_> {
@ -570,19 +566,10 @@ impl PcscCard {
// successfully opened the OpenPGP application
// -- debug: status --
let tx = txc.tx();
let stat = tx.status2_owned().map_err(|e| {
Error::Smartcard(SmartcardError::Error(format!(
"{:?}",
e
)))
})?;
log::debug!("4b card status: {:x?}", stat);
txc = TxClient {
tx,
card_caps: None,
reader_caps: HashMap::default(),
};
log::debug!(
"4b card status: {:x?}",
txc.tx.status2_owned()
);
// -- /debug: status --