From 485870a6b1c4b69fcac5836e240d665c25d7cac2 Mon Sep 17 00:00:00 2001 From: Lyle Mantooth Date: Sat, 20 May 2023 12:19:59 -0400 Subject: [PATCH] Forgot to mark these async. --- Cargo.toml | 2 +- src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6f39e57..854b611 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "locat" -version = "0.3.0" +version = "0.3.1" edition = "2021" publish = ["menteeth"] diff --git a/src/lib.rs b/src/lib.rs index e6c37a8..7bb21c1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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::(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() } }