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