Skip to content

Releases: oschwald/maxminddb-rust

0.26.0

29 Mar 23:26
1023bab
Compare
Choose a tag to compare
  • BREAKING CHANGE: The lookup and lookup_prefix methods now return
    Ok(None) or Ok((None, prefix_len)) respectively when an IP address is
    valid but not found in the database (or has no associated data record),
    instead of returning an Err(MaxMindDbError::AddressNotFoundError).
    Code previously matching on AddressNotFoundError must be updated to
    handle the Ok(None) / Ok((None, prefix_len)) variants.
  • BREAKING CHANGE: The MaxMindDBError enum has been renamed
    MaxMindDbError and variants have been renamed and refactored. For
    example, IoError is now Io, InvalidDatabaseError is now
    InvalidDatabase, DecodingError is now Decoding,
    InvalidNetworkError is now InvalidNetwork. The MapError variant has
    been replaced by Mmap (under the mmap feature flag). Code explicitly
    matching on the old variant names must be updated.
  • BREAKING CHANGE: MaxMindDbError no longer implements PartialEq.
    This is because underlying error types like std::io::Error (now
    wrapped by the Io and Mmap variants) do not implement PartialEq.
    Code comparing errors directly using == or assert_eq! must be
    updated, typically by using matches! or by matching on the error
    kind and potentially its contents.
  • Refactored MaxMindDbError handling using the thiserror crate.
    Variants like Io, Mmap, and InvalidNetwork now directly wrap
    the underlying error types (std::io::Error, ipnetwork::IpNetworkError).
  • Errors wrapping underlying types (Io, Mmap, InvalidNetwork) now
    correctly implement std::error::Error::source(), allowing inspection
    of the original cause.
  • The Display implementation for MaxMindDbError has been refined to
    generally show only the specific error details, often including the
    message from the source error, rather than prefixing with the variant
    name.
  • lookup_prefix now returns the prefix length of the entry even when the
    value is not found.
  • Fixed an internal bounds checking error when resolving data pointers.
    The previous logic could cause a panic on a corrupt database.

0.25.0

16 Feb 19:50
5c5d717
Compare
Choose a tag to compare
  • Serde will now skip serialization of the GeoIP2 struct fields
    when Option is none. Pull request by Stefan Sundin. GitHub #79.
  • Serialize and Clone were added to the Metadata struct. Pull
    request by Stefan Sundin. GitHub #80.
  • Added feature to use simdutf8 as a faster alternative when
    unsafe-str-decode is too risky. Pull request by Jakub Onderka.
    GitHub #88.
  • Minor internal refactoring and performance improvements.

0.24.0

14 Feb 14:45
9045bfe
Compare
Choose a tag to compare
  • Added the is_anycast field to the Traits struct. Pull request
    by Skye. GitHub #73.

0.23.0

03 Apr 23:22
c4b3be0
Compare
Choose a tag to compare
  • Added lookup_prefix to return the prefix length for the network
    associated with the IP address. Pull request by Marek Vavruša.
    GitHub #26.

0.22.0

23 Mar 19:10
Compare
Choose a tag to compare
  • A within method has been added to the reader to allow iterating
    over all records in the database. Pull request by Ross McFarland.
    Github #50.
  • Database structs in maxminddb::geoip2 have been updated. Most
    noticeably, an Enterprise struct has been added and the model
    module has been replaced by city and country modules. Also,
    several missing fields have been added.
  • Mmap is now re-exported for convenience. Pull request by zhuhaow.
    GitHub #54.
  • Upgraded memmap2 dependency.