Skip to content

Commit

Permalink
Support unsized octets in parsing ZoneRecordData and UnknownRecordData (
Browse files Browse the repository at this point in the history
#237)

This PR adds `?Sized` bounds to the octets type for parsing ZoneRecordData
and UnknownRecordData.
  • Loading branch information
hunts authored Oct 26, 2023
1 parent c20176b commit 821b509
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/base/rdata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ impl<Octs: AsRef<[u8]>> RecordData for UnknownRecordData<Octs> {
}
}

impl<'a, Octs: Octets> ParseRecordData<'a, Octs>
impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs>
for UnknownRecordData<Octs::Range<'a>>
{
fn parse_rdata(
Expand Down
2 changes: 1 addition & 1 deletion src/rdata/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ macro_rules! rdata_types {
}
}

impl<'a, Octs: octseq::octets::Octets>
impl<'a, Octs: octseq::octets::Octets + ?Sized>
$crate::base::rdata::ParseRecordData<'a, Octs>
for ZoneRecordData<Octs::Range<'a>, ParsedDname<Octs::Range<'a>>> {
fn parse_rdata(
Expand Down

0 comments on commit 821b509

Please sign in to comment.