Finally working

This commit is contained in:
Maciej Hirsz
2020-09-29 19:16:28 +02:00
parent 4a5bafcd41
commit 8bf1020c16
8 changed files with 108 additions and 87 deletions
+2 -2
View File
@@ -98,7 +98,7 @@ impl Handler<LocateRequest> for Locator {
let location = match self.iplocate(ip) {
Ok(location) => location,
Err(err) => return debug!("GET error for ip location: {:?}", err),
Err(err) => return log::debug!("GET error for ip location: {:?}", err),
};
self.cache.write().insert(ip, location.clone());
@@ -140,7 +140,7 @@ impl Locator {
match self.client.get(url).send()?.json::<T>() {
Ok(result) => Ok(Some(result)),
Err(err) => {
debug!("JSON error for ip location: {:?}", err);
log::debug!("JSON error for ip location: {:?}", err);
Ok(None)
}
}