Browse Source

tests: import crate Result

preview
Stefan Bühler 2 years ago
parent
commit
abfd1e9b95
  1. 9
      lib/dnsbox-base/src/records/tests/mod.rs

9
lib/dnsbox-base/src/records/tests/mod.rs

@ -1,6 +1,7 @@
mod powerdns_tests;
use crate::common_types::classes;
use crate::errors::*;
use crate::records::structs;
use crate::ser::packet::DnsPacketData;
use crate::ser::{packet, text, StaticRRData};
@ -9,7 +10,7 @@ use failure::ResultExt;
use std::fmt;
use std::io::Cursor;
fn rrdata_de<T>(data: &'static [u8]) -> crate::errors::Result<T>
fn rrdata_de<T>(data: &'static [u8]) -> Result<T>
where
T: StaticRRData,
{
@ -19,7 +20,7 @@ where
Ok(result)
}
fn rrdata_parse<T>(data: &str) -> crate::errors::Result<T>
fn rrdata_parse<T>(data: &str) -> Result<T>
where
T: StaticRRData,
{
@ -30,7 +31,7 @@ where
text::parse_with(data, |data| T::dns_parse_rr_data(&ctx, data))
}
fn check<T>(txt: &str, data: &'static [u8]) -> crate::errors::Result<()>
fn check<T>(txt: &str, data: &'static [u8]) -> Result<()>
where
T: StaticRRData + fmt::Debug + PartialEq,
{
@ -40,7 +41,7 @@ where
Ok(())
}
fn check2<T>(txt: &str, data: &'static [u8], canon: &str) -> crate::errors::Result<()>
fn check2<T>(txt: &str, data: &'static [u8], canon: &str) -> Result<()>
where
T: StaticRRData + fmt::Debug + PartialEq,
{

Loading…
Cancel
Save