utils: add From<&NameServerAddr> for Url

This commit is contained in:
Luna Yao
2026-04-06 11:54:01 +02:00
parent 83bdcf0d2b
commit 75ad15c324
2 changed files with 13 additions and 5 deletions
+4 -2
View File
@@ -200,8 +200,10 @@ impl Zone {
A: AsRef<str>,
{
let name_servers = forwarders
.into_iter()
.map(|s| s.as_ref().parse::<NameServerAddr>().map(Into::into))
.map(|f| {
let addr: NameServerAddr = f.as_ref().parse()?;
Ok((&addr).into())
})
.collect::<anyhow::Result<Vec<_>>>()?
.into();
self.forward = Some(ForwardConfig {