Use Cow for NameServers::ns
This commit is contained in:
parent
da87740b3f
commit
3565e8eb07
|
@ -58,7 +58,7 @@ impl<'a> DomainCreate<'a> {
|
||||||
domain: DomainCreateRequestData {
|
domain: DomainCreateRequestData {
|
||||||
name,
|
name,
|
||||||
period,
|
period,
|
||||||
ns: ns.map(|ns| NameServers { ns: ns.to_vec() }),
|
ns: ns.map(|ns| NameServers { ns: ns.into() }),
|
||||||
registrant,
|
registrant,
|
||||||
auth_info: DomainAuthInfo::new(auth_password),
|
auth_info: DomainAuthInfo::new(auth_password),
|
||||||
contacts,
|
contacts,
|
||||||
|
|
|
@ -130,7 +130,7 @@ pub enum HostInfo<'a> {
|
||||||
#[derive(Debug, FromXml, ToXml)]
|
#[derive(Debug, FromXml, ToXml)]
|
||||||
#[xml(rename = "ns", ns(XMLNS))]
|
#[xml(rename = "ns", ns(XMLNS))]
|
||||||
pub struct NameServers<'a> {
|
pub struct NameServers<'a> {
|
||||||
pub ns: Vec<HostInfo<'a>>,
|
pub ns: Cow<'a, [HostInfo<'a>]>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The <contact> type on domain creation and update requests
|
/// The <contact> type on domain creation and update requests
|
||||||
|
|
Loading…
Reference in New Issue