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