Forgot to mark these async.
This commit is contained in:
parent
83381e4933
commit
485870a6b1
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "locat"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
edition = "2021"
|
||||
publish = ["menteeth"]
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ impl Locat {
|
|||
}
|
||||
|
||||
/// 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
|
||||
.lookup::<maxminddb::geoip2::Country>(addr)
|
||||
.ok()?
|
||||
|
@ -30,7 +30,7 @@ impl Locat {
|
|||
}
|
||||
|
||||
/// 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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue