From fad592cf2908be4cfcc8feee3d94b7a469e76b51 Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Fri, 19 Jul 2024 16:18:11 +0200 Subject: [PATCH] fix clippy pedantic lints --- src/mmdb/types/mmdb_asn_entry.rs | 2 +- src/mmdb/types/mmdb_country_entry.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mmdb/types/mmdb_asn_entry.rs b/src/mmdb/types/mmdb_asn_entry.rs index ec1ad81f..cf83091b 100644 --- a/src/mmdb/types/mmdb_asn_entry.rs +++ b/src/mmdb/types/mmdb_asn_entry.rs @@ -30,7 +30,7 @@ impl MmdbAsnCode<'_> { fn get_code(&self) -> String { match self { Self::Int(Some(code)) => code.to_string(), - Self::Str(Some(code)) => code.to_string(), + Self::Str(Some(code)) => (*code).to_string(), _ => String::new(), } } diff --git a/src/mmdb/types/mmdb_country_entry.rs b/src/mmdb/types/mmdb_country_entry.rs index 18fa047d..fffa5b6e 100644 --- a/src/mmdb/types/mmdb_country_entry.rs +++ b/src/mmdb/types/mmdb_country_entry.rs @@ -29,8 +29,8 @@ impl MmdbCountryEntryInner<'_> { match self { Self::Standard(StandardCountryEntry { country: Some(StandardCountryEntryInner { iso_code: Some(c) }), - }) => Country::from_str(c), - Self::Ipinfo(IpinfoCountryEntry { country: Some(c) }) => Country::from_str(c), + }) + | Self::Ipinfo(IpinfoCountryEntry { country: Some(c) }) => Country::from_str(c), _ => Country::ZZ, } }