Closed rusty-snake closed 3 years ago
That's by design. Try parse_dns_name
instead.
use addr::parser::DnsName;
use psl::List;
fn main() {
match List.parse_dns_name("sub_domain.example.com") {
Ok(ok) => println!("{}", ok),
Err(err) => println!("{}", err),
}
}
Ahh, ok that works. Then needs the differences between dns name and domain name better documentation.
Yeah, sure. Let's leave this open for now until such documentation is in place.
Old issue: rushmorem/publicsuffix#33
My test program outputs
domain contains illegal characters
. But if you replace the_
with a-
, it outputssub-domain.example.com
.src/main.rs
:Cargo.local
: