Skip to content

Commit

Permalink
Adjust Zonemd to new octets conversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
partim committed Oct 5, 2023
1 parent 050f3a5 commit 41df90d
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions src/rdata/zonemd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use crate::base::cmp::CanonicalOrd;
use crate::base::iana::Rtype;
use crate::base::name::PushError;
use crate::base::rdata::{ComposeRecordData, RecordData};
use crate::base::scan::{Scan, Scanner};
use crate::base::serial::Serial;
Expand Down Expand Up @@ -114,23 +113,10 @@ impl<Octs> Zonemd<Octs> {
})
}

pub fn flatten_into<OO>(self) -> Result<Zonemd<OO>, PushError>
where
OO: OctetsFrom<Octs>,
{
let Zonemd {
serial,
scheme,
algo,
digest,
} = self;

Ok(Zonemd {
serial,
scheme,
algo,
digest: digest.try_octets_into().map_err(Into::into)?,
})
pub(super) fn flatten<Target: OctetsFrom<Octs>>(
self
) -> Result<Zonemd<Target>, Target::Error> {
self.convert_octets()
}

pub(super) fn convert_octets<Target: OctetsFrom<Octs>>(
Expand Down

0 comments on commit 41df90d

Please sign in to comment.