Forgot to mark these async.
This commit is contained in:
		
							parent
							
								
									83381e4933
								
							
						
					
					
						commit
						485870a6b1
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -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"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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()
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue