Forgot to mark these async.

This commit is contained in:
Lyle Mantooth 2023-05-20 12:19:59 -04:00
parent 83381e4933
commit 485870a6b1
Signed by: IslandUsurper
GPG key ID: 6DB52EAE123A5789
2 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
[package] [package]
name = "locat" name = "locat"
version = "0.3.0" version = "0.3.1"
edition = "2021" edition = "2021"
publish = ["menteeth"] publish = ["menteeth"]

View file

@ -21,7 +21,7 @@ impl Locat {
} }
/// Converts an address to an ISO 3166-1 alpha-2 country code. /// Converts an address to an ISO 3166-1 alpha-2 country code.
pub fn ip_to_iso_code(&self, addr: IpAddr) -> Option<&str> { pub async fn ip_to_iso_code(&self, addr: IpAddr) -> Option<&str> {
self.geoip self.geoip
.lookup::<maxminddb::geoip2::Country>(addr) .lookup::<maxminddb::geoip2::Country>(addr)
.ok()? .ok()?
@ -30,7 +30,7 @@ impl Locat {
} }
/// Returns a map of country codes to number of requests. /// Returns a map of country codes to number of requests.
pub fn get_analytics(&self) -> Vec<(String, u64)> { pub async fn get_analytics(&self) -> Vec<(String, u64)> {
Default::default() Default::default()
} }
} }