extern crate maxminddb;

use std::net::IpAddr;
use std::str::FromStr;

use maxminddb::geoip2;

fn main() {
    let reader =
        maxminddb::Reader::open_readfile("/usr/local/share/GeoIP/GeoIP2-City.mmdb").unwrap();
    let ip: IpAddr = FromStr::from_str("128.101.101.101").unwrap();
    let city: geoip2::City = reader.lookup(ip).unwrap();
    println!("{:?}", city);
}

extern crate maxminddb;

use std::net::IpAddr;
use std::str::FromStr;

use maxminddb::geoip2;

fn main() {
    let reader = maxminddb::Reader::open_readfile("/usr/local/share/GeoIP/GeoIP2-City.mmdb").unwrap();
    let ip: IpAddr = FromStr::from_str("128.101.101.101").unwrap();
    let city: geoip2::City = reader.lookup(ip).unwrap();
    println!("{:?}", city);
}

--- 
+++ 
@@ -6,7 +6,8 @@
 use maxminddb::geoip2;
 
 fn main() {
-    let reader = maxminddb::Reader::open_readfile("/usr/local/share/GeoIP/GeoIP2-City.mmdb").unwrap();
+    let reader =
+        maxminddb::Reader::open_readfile("/usr/local/share/GeoIP/GeoIP2-City.mmdb").unwrap();
     let ip: IpAddr = FromStr::from_str("128.101.101.101").unwrap();
     let city: geoip2::City = reader.lookup(ip).unwrap();
     println!("{:?}", city);
Add DensityIncome, Domain and ASN records, update country
