openpgp-card-sequoia: make Card<Transaction>::new private

This commit is contained in:
Heiko Schaefer 2023-08-17 15:26:15 +02:00
parent dcf98c512c
commit ccf605f086
No known key found for this signature in database
GPG key ID: 4A849A1904CCBD7D

View file

@ -264,11 +264,8 @@ impl Card<Open> {
} }
impl<'a> Card<Transaction<'a>> { impl<'a> Card<Transaction<'a>> {
/// Do not use! // Internal constructor
/// fn new(mut opt: OpenPgpTransaction<'a>) -> Result<Self, Error> {
/// FIXME: this interface is currently used in `card-functionality`, for testing.
/// It will be removed.
pub fn new(mut opt: OpenPgpTransaction<'a>) -> Result<Self, Error> {
let ard = opt.application_related_data()?; let ard = opt.application_related_data()?;
Ok(Self { Ok(Self {