Don't implement From<T> for Box<dyn T>.

- This is usually unnecessary.
This commit is contained in:
Neal H. Walfield 2022-02-18 17:44:07 +01:00
parent 64119c4f29
commit ff1dac427c
No known key found for this signature in database
GPG key ID: 6863C9AD5B4D22D3
2 changed files with 0 additions and 12 deletions

View file

@ -40,12 +40,6 @@ pub struct PcscBackend {
reader_caps: HashMap<u8, Tlv>, reader_caps: HashMap<u8, Tlv>,
} }
impl From<PcscBackend> for Box<dyn CardBackend> {
fn from(card: PcscBackend) -> Box<dyn CardBackend> {
Box::new(card) as Box<dyn CardBackend>
}
}
/// An implementation of the CardTransaction trait that uses the PCSC lite /// An implementation of the CardTransaction trait that uses the PCSC lite
/// middleware to access the OpenPGP card application on smart cards, via a /// middleware to access the OpenPGP card application on smart cards, via a
/// PCSC "transaction". /// PCSC "transaction".

View file

@ -55,12 +55,6 @@ pub struct ScdBackend {
card_caps: Option<CardCaps>, card_caps: Option<CardCaps>,
} }
impl From<ScdBackend> for Box<dyn CardBackend> {
fn from(card: ScdBackend) -> Box<dyn CardBackend> {
Box::new(card) as Box<dyn CardBackend>
}
}
impl ScdBackend { impl ScdBackend {
/// Open a CardApp that uses an scdaemon instance as its backend. /// Open a CardApp that uses an scdaemon instance as its backend.
/// The specific card with AID `serial` is requested from scdaemon. /// The specific card with AID `serial` is requested from scdaemon.