- This release includes major performance improvements and code cleanup. Pull request by Sebastian Mayr. GitHub #37.
- Remove crate options leftover from before Rust 1.0. In particular,
this crate no longer specifies
crate_type
. This should allow you to compile it withpanic = "abort"
. Reported by ye2020. GitHub #33.
- BREAKING CHANGE: All Strings in the
geoip2
structs are not returned as references. This was done to provide a significant performance improvement when ownership is not needed. Pull request by Matthew Wynn. GitHub #31. - A new opt-in feature,
unsafe-str-decode
, has been added that will skip UTF-8 validation when decoding strings. You should only use this when you trust that the MaxMind DB is valid and contains valid UTF-8 strings. This provides a modest performance improvement. Pull request by Matthew Wynn. GitHub #31. - Many other internal improvements to reduce the number of allocations.
- Missing models for
DensityIncome
,Domain
, andAsn
were added and the missingis_in_european_union
field was added to theCountry
model. Pull request by Sebastian Nadorp. GitHub #19. - More details are now included in the
Display
implementation forMaxMindDBError
. Pull request by Mike Cooper. GitHub #20.
Reader::open
has been removed. You should useReader::open_readfile
orReader::open_mmap
. Pull request by kpcyrd. GitHub #17 & #18.Reader::open_readfile
no longer depends onunsafe
. Pull request by kpcyrd. GitHub #17 & #18.
- An optional
mmap
cfg feature flag has been added. When set,open
will use thememmap
crate to memory map the database file rather than reading it from file. In addition toopen
,open_readfile
andopen_mmap
are available. PR by moschroe. GitHub #16. Reader::open
now takes anAsRef<Path>
. Also, #16.Reader::from_buf
allows using an existing buffer instead of specifying a database file. PR by kpcyrd. GitHub #15.
- Derive
Serialize
for GeoIP2 models. Pull request by Bryan Gilbert. GitHub #11.
- Update logger to 0.4 and env_logger to 0.5.
- Implement unimplemented deserialize methods.
- API CHANGE: Switch to Serde for deserialization. Data structures being
deserialized to must implement the
Deserialize
trait. Pull request by Wesley Moore. GitHub #5.
- Update
log
to 0.3.7 andrustc-serialize
to 0.3.23.
- Update
rustc-serialize
to 0.3.21.
- API CHANGE:
lookup
takes anIpAddr
again instead of aSocketAddr
. We previously switched toSocketAddr
afterIpAddr
had been deprecated, but it has since been re-added.