diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2022-10-24 21:52:30 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2022-10-24 21:52:30 +0200 |
commit | a607f4bcab2e846cb2b91761be808eb516d03d8f (patch) | |
tree | e8586e6a02ffdf09d7e38fbd2bcc789444c70d20 /src/common/nameserver.rs | |
parent | 0acc44b468a6c244620efee7470fc24d6971e085 (diff) |
get rid of some of the static lifetimes
Diffstat (limited to 'src/common/nameserver.rs')
-rw-r--r-- | src/common/nameserver.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/nameserver.rs b/src/common/nameserver.rs index 9b8c797..706ae73 100644 --- a/src/common/nameserver.rs +++ b/src/common/nameserver.rs @@ -97,7 +97,7 @@ impl TryFrom<String> for RecordType { "TXT" => Ok(Self::Txt), "URI" => Ok(Self::Uri), "URL" => Ok(Self::Url), - _ => Err(Error::BadVariant("RecordType", s)), + _ => Err(Error::BadVariant("RecordType".into(), s)), } } } @@ -124,7 +124,7 @@ impl TryFrom<String> for DomainType { match s.as_str() { "MASTER" => Ok(Self::Master), "SLAVE" => Ok(Self::Slave), - _ => Err(Error::BadVariant("DomainType", s)), + _ => Err(Error::BadVariant("DomainType".into(), s)), } } } @@ -140,8 +140,8 @@ impl TryFrom<BTreeMap<String, xmlrpc::Value>> for SlaveDns { type Error = Error; fn try_from(map: BTreeMap<String, xmlrpc::Value>) -> Result<Self> { Ok(Self { - hostname: get_str(&map, "name")?, - address: get_str(&map, "ip")?, + hostname: get_str(&map, "name".into())?, + address: get_str(&map, "ip".into())?, }) } } @@ -171,7 +171,7 @@ impl TryFrom<String> for UrlRdrType { "HEADER301" => Ok(Self::Permanent), "HEADER302" => Ok(Self::Temporary), "FRAME" => Ok(Self::Frame), - _ => Err(Error::BadVariant("UrlRdrType", s)), + _ => Err(Error::BadVariant("UrlRdrType".into(), s)), } } } |