|
1 |
| -# Change Log # |
| 1 | +# Change Log |
2 | 2 |
|
3 | 3 | ## 0.26.0 - 2025-03-28
|
4 | 4 |
|
5 |
| -* **BREAKING CHANGE:** The `lookup` and `lookup_prefix` methods now return |
| 5 | +- **BREAKING CHANGE:** The `lookup` and `lookup_prefix` methods now return |
6 | 6 | `Ok(None)` or `Ok((None, prefix_len))` respectively when an IP address is
|
7 | 7 | valid but not found in the database (or has no associated data record),
|
8 |
| - instead of returning an `Err(MaxMindDbError::AddressNotFoundError)`. |
9 |
| - Code previously matching on `AddressNotFoundError` must be updated to |
10 |
| - handle the `Ok(None)` / `Ok((None, prefix_len))` variants. |
11 |
| -* **BREAKING CHANGE:** The `MaxMindDBError` enum has been renamed |
12 |
| - `MaxMindDbError` and variants have been renamed and refactored. For |
13 |
| - example, `IoError` is now `Io`, `InvalidDatabaseError` is now |
14 |
| - `InvalidDatabase`, `DecodingError` is now `Decoding`, |
15 |
| - `InvalidNetworkError` is now `InvalidNetwork`. The `MapError` variant has |
16 |
| - been replaced by `Mmap` (under the `mmap` feature flag). Code explicitly |
17 |
| - matching on the old variant names must be updated. |
18 |
| -* **BREAKING CHANGE:** `MaxMindDbError` no longer implements `PartialEq`. |
19 |
| - This is because underlying error types like `std::io::Error` (now |
20 |
| - wrapped by the `Io` and `Mmap` variants) do not implement `PartialEq`. |
21 |
| - Code comparing errors directly using `==` or `assert_eq!` must be |
22 |
| - updated, typically by using `matches!` or by matching on the error |
23 |
| - kind and potentially its contents. |
24 |
| -* Refactored `MaxMindDbError` handling using the `thiserror` crate. |
25 |
| - Variants like `Io`, `Mmap`, and `InvalidNetwork` now directly wrap |
26 |
| - the underlying error types (`std::io::Error`, `ipnetwork::IpNetworkError`). |
27 |
| -* Errors wrapping underlying types (`Io`, `Mmap`, `InvalidNetwork`) now |
28 |
| - correctly implement `std::error::Error::source()`, allowing inspection |
29 |
| - of the original cause. |
30 |
| -* The `Display` implementation for `MaxMindDbError` has been refined to |
31 |
| - generally show only the specific error details, often including the |
32 |
| - message from the source error, rather than prefixing with the variant |
33 |
| - name. |
34 |
| -* `lookup_prefix` now returns the prefix length of the entry even when the |
| 8 | + instead of returning an `Err(MaxMindDbError::AddressNotFoundError)`. Code |
| 9 | + previously matching on `AddressNotFoundError` must be updated to handle the |
| 10 | + `Ok(None)` / `Ok((None, prefix_len))` variants. |
| 11 | +- **BREAKING CHANGE:** The `MaxMindDBError` enum has been renamed |
| 12 | + `MaxMindDbError` and variants have been renamed and refactored. For example, |
| 13 | + `IoError` is now `Io`, `InvalidDatabaseError` is now `InvalidDatabase`, |
| 14 | + `DecodingError` is now `Decoding`, `InvalidNetworkError` is now |
| 15 | + `InvalidNetwork`. The `MapError` variant has been replaced by `Mmap` (under |
| 16 | + the `mmap` feature flag). Code explicitly matching on the old variant names |
| 17 | + must be updated. |
| 18 | +- **BREAKING CHANGE:** `MaxMindDbError` no longer implements `PartialEq`. This |
| 19 | + is because underlying error types like `std::io::Error` (now wrapped by the |
| 20 | + `Io` and `Mmap` variants) do not implement `PartialEq`. Code comparing errors |
| 21 | + directly using `==` or `assert_eq!` must be updated, typically by using |
| 22 | + `matches!` or by matching on the error kind and potentially its contents. |
| 23 | +- Refactored `MaxMindDbError` handling using the `thiserror` crate. Variants |
| 24 | + like `Io`, `Mmap`, and `InvalidNetwork` now directly wrap the underlying |
| 25 | + error types (`std::io::Error`, `ipnetwork::IpNetworkError`). |
| 26 | +- Errors wrapping underlying types (`Io`, `Mmap`, `InvalidNetwork`) now |
| 27 | + correctly implement `std::error::Error::source()`, allowing inspection of the |
| 28 | + original cause. |
| 29 | +- The `Display` implementation for `MaxMindDbError` has been refined to |
| 30 | + generally show only the specific error details, often including the message |
| 31 | + from the source error, rather than prefixing with the variant name. |
| 32 | +- `lookup_prefix` now returns the prefix length of the entry even when the |
35 | 33 | value is not found.
|
36 |
| -* Fixed an internal bounds checking error when resolving data pointers. |
37 |
| - The previous logic could cause a panic on a corrupt database. |
38 |
| - |
| 34 | +- Fixed an internal bounds checking error when resolving data pointers. The |
| 35 | + previous logic could cause a panic on a corrupt database. |
39 | 36 |
|
40 | 37 | ## 0.25.0 - 2025-02-16
|
41 | 38 |
|
42 |
| -* Serde will now skip serialization of the GeoIP2 struct fields |
43 |
| - when `Option` is none. Pull request by Stefan Sundin. GitHub #79. |
44 |
| -* `Serialize` and `Clone` were added to the `Metadata` struct. Pull |
45 |
| - request by Stefan Sundin. GitHub #80. |
46 |
| -* Added feature to use `simdutf8` as a faster alternative when |
47 |
| - `unsafe-str-decode` is too risky. Pull request by Jakub Onderka. |
48 |
| - GitHub #88. |
49 |
| -* Minor internal refactoring and performance improvements. |
| 39 | +- Serde will now skip serialization of the GeoIP2 struct fields when `Option` |
| 40 | + is none. Pull request by Stefan Sundin. GitHub #79. |
| 41 | +- `Serialize` and `Clone` were added to the `Metadata` struct. Pull request by |
| 42 | + Stefan Sundin. GitHub #80. |
| 43 | +- Added feature to use `simdutf8` as a faster alternative when |
| 44 | + `unsafe-str-decode` is too risky. Pull request by Jakub Onderka. GitHub #88. |
| 45 | +- Minor internal refactoring and performance improvements. |
50 | 46 |
|
51 | 47 | ## 0.24.0 - 2024-01-09
|
52 | 48 |
|
53 |
| -* Added the `is_anycast` field to the `Traits` struct. Pull request |
54 |
| - by Skye. GitHub #73. |
| 49 | +- Added the `is_anycast` field to the `Traits` struct. Pull request by Skye. |
| 50 | + GitHub #73. |
55 | 51 |
|
56 | 52 | ## 0.23.0 - 2022-04-03
|
57 | 53 |
|
58 |
| -* Added `lookup_prefix` to return the prefix length for the network |
59 |
| - associated with the IP address. Pull request by Marek Vavruša. |
60 |
| - GitHub #26. |
| 54 | +- Added `lookup_prefix` to return the prefix length for the network associated |
| 55 | + with the IP address. Pull request by Marek Vavruša. GitHub #26. |
61 | 56 |
|
62 | 57 | ## 0.22.0 - 2022-03-23
|
63 | 58 |
|
64 |
| -* A `within` method has been added to the reader to allow iterating |
65 |
| - over all records in the database. Pull request by Ross McFarland. |
66 |
| - Github #50. |
67 |
| -* Database structs in `maxminddb::geoip2` have been updated. Most |
68 |
| - noticeably, an `Enterprise` struct has been added and the `model` |
69 |
| - module has been replaced by `city` and `country` modules. Also, |
70 |
| - several missing fields have been added. |
71 |
| -* `Mmap` is now re-exported for convenience. Pull request by zhuhaow. |
72 |
| - GitHub #54. |
73 |
| -* Upgraded memmap2 dependency. |
| 59 | +- A `within` method has been added to the reader to allow iterating over all |
| 60 | + records in the database. Pull request by Ross McFarland. Github #50. |
| 61 | +- Database structs in `maxminddb::geoip2` have been updated. Most noticeably, |
| 62 | + an `Enterprise` struct has been added and the `model` module has been |
| 63 | + replaced by `city` and `country` modules. Also, several missing fields have |
| 64 | + been added. |
| 65 | +- `Mmap` is now re-exported for convenience. Pull request by zhuhaow. GitHub |
| 66 | + #54. |
| 67 | +- Upgraded memmap2 dependency. |
74 | 68 |
|
75 | 69 | ## 0.21.0 - 2021-07-20
|
76 | 70 |
|
77 |
| -* Reduce the amount of code generated by shrinking generic methods. |
78 |
| - Pull request by Markus Westerlind. GitHub #49. |
| 71 | +- Reduce the amount of code generated by shrinking generic methods. Pull |
| 72 | + request by Markus Westerlind. GitHub #49. |
79 | 73 |
|
80 | 74 | ## 0.20.0 - 2021-07-11
|
81 | 75 |
|
82 |
| -* Use `try_into` when decoding floating point values. Pull request |
83 |
| - by Sebastian Mayr. GitHub #47. |
| 76 | +- Use `try_into` when decoding floating point values. Pull request by Sebastian |
| 77 | + Mayr. GitHub #47. |
84 | 78 |
|
85 | 79 | ## 0.19.0 - 2021-06-25
|
86 | 80 |
|
87 |
| -* Switch from `memmap` to `memmap2`. Pull request by Gleb Pomykalov. |
88 |
| - GitHub #46. |
| 81 | +- Switch from `memmap` to `memmap2`. Pull request by Gleb Pomykalov. GitHub |
| 82 | + #46. |
89 | 83 |
|
90 | 84 | ## 0.18.0 - 2021-05-29
|
91 | 85 |
|
92 |
| -* The `memchr` crate is now used to improve the performance of finding |
93 |
| - the metadata start. Pull request by Markus Westerlind. GitHub #44. |
| 86 | +- The `memchr` crate is now used to improve the performance of finding the |
| 87 | + metadata start. Pull request by Markus Westerlind. GitHub #44. |
94 | 88 |
|
95 | 89 | ## 0.17.3 - 2021-05-29
|
96 | 90 |
|
97 |
| -* Correct handling of pointers in the database metadata section. This |
98 |
| - bug caused the latest GeoIP2 ISP database from MaxMind to fail to |
99 |
| - load with an `InvalidDatabaseError` due to an invalid data type. |
100 |
| - Reported by Marwes-Imperva. GitHub #45. |
| 91 | +- Correct handling of pointers in the database metadata section. This bug |
| 92 | + caused the latest GeoIP2 ISP database from MaxMind to fail to load with an |
| 93 | + `InvalidDatabaseError` due to an invalid data type. Reported by |
| 94 | + Marwes-Imperva. GitHub #45. |
101 | 95 |
|
102 | 96 | ## 0.17.2 - 2021-02-11
|
103 | 97 |
|
104 |
| -* Minor cleanup. |
| 98 | +- Minor cleanup. |
105 | 99 |
|
106 | 100 | ## 0.17.1 - 2021-01-03
|
107 | 101 |
|
108 |
| -* Restore compatibility with targets that don't support 128-bit integers. |
109 |
| - Pull request by Filip. GitHub #41. |
| 102 | +- Restore compatibility with targets that don't support 128-bit integers. Pull |
| 103 | + request by Filip. GitHub #41. |
110 | 104 |
|
111 | 105 | ## 0.17.0 - 2020-12-12
|
112 | 106 |
|
113 |
| -* Unsigned 128-bit integers are now decoded to a `u128` rather than a |
114 |
| - `[u8]`. Pull request by moschroe. GitHub #40. |
| 107 | +- Unsigned 128-bit integers are now decoded to a `u128` rather than a `[u8]`. |
| 108 | + Pull request by moschroe. GitHub #40. |
115 | 109 |
|
116 | 110 | ## 0.16.0 - 2020-12-05
|
117 | 111 |
|
118 |
| -* This release includes major performance improvements and code cleanup. |
119 |
| - Pull request by Sebastian Mayr. GitHub #37. |
| 112 | +- This release includes major performance improvements and code cleanup. Pull |
| 113 | + request by Sebastian Mayr. GitHub #37. |
120 | 114 |
|
121 | 115 | ## 0.15.0 - 2020-10-10
|
122 | 116 |
|
123 |
| -* Remove crate options leftover from before Rust 1.0. In particular, |
124 |
| - this crate no longer specifies `crate_type`. This should allow you to |
125 |
| - compile it with `panic = "abort"`. Reported by ye2020. GitHub #33. |
| 117 | +- Remove crate options leftover from before Rust 1.0. In particular, this crate |
| 118 | + no longer specifies `crate_type`. This should allow you to compile it with |
| 119 | + `panic = "abort"`. Reported by ye2020. GitHub #33. |
126 | 120 |
|
127 | 121 | ## 0.14.0 - 2020-06-07
|
128 | 122 |
|
129 |
| -* BREAKING CHANGE: All Strings in the `geoip2` structs are not returned |
130 |
| - as references. This was done to provide a significant performance |
131 |
| - improvement when ownership is not needed. Pull request by Matthew Wynn. |
| 123 | +- BREAKING CHANGE: All Strings in the `geoip2` structs are not returned as |
| 124 | + references. This was done to provide a significant performance improvement |
| 125 | + when ownership is not needed. Pull request by Matthew Wynn. GitHub #31. |
| 126 | +- A new opt-in feature, `unsafe-str-decode`, has been added that will skip |
| 127 | + UTF-8 validation when decoding strings. You should only use this when you |
| 128 | + trust that the MaxMind DB is valid and contains valid UTF-8 strings. This |
| 129 | + provides a modest performance improvement. Pull request by Matthew Wynn. |
132 | 130 | GitHub #31.
|
133 |
| -* A new opt-in feature, `unsafe-str-decode`, has been added that will |
134 |
| - skip UTF-8 validation when decoding strings. You should only use this |
135 |
| - when you trust that the MaxMind DB is valid and contains valid UTF-8 |
136 |
| - strings. This provides a modest performance improvement. Pull request |
137 |
| - by Matthew Wynn. GitHub #31. |
138 |
| -* Many other internal improvements to reduce the number of allocations. |
| 131 | +- Many other internal improvements to reduce the number of allocations. |
139 | 132 |
|
140 | 133 | ## 0.13.0 - 2019-01-21
|
141 | 134 |
|
142 |
| -* Missing models for `DensityIncome`, `Domain`, and `Asn` were added |
143 |
| - and the missing `is_in_european_union` field was added to the |
144 |
| - `Country` model. Pull request by Sebastian Nadorp. GitHub #19. |
145 |
| -* More details are now included in the `Display` implementation for |
| 135 | +- Missing models for `DensityIncome`, `Domain`, and `Asn` were added and the |
| 136 | + missing `is_in_european_union` field was added to the `Country` model. Pull |
| 137 | + request by Sebastian Nadorp. GitHub #19. |
| 138 | +- More details are now included in the `Display` implementation for |
146 | 139 | `MaxMindDBError`. Pull request by Mike Cooper. GitHub #20.
|
147 | 140 |
|
148 | 141 | ## 0.12.0 - 2018-12-09
|
149 | 142 |
|
150 |
| -* `Reader::open` has been removed. You should use `Reader::open_readfile` |
151 |
| - or `Reader::open_mmap`. Pull request by kpcyrd. GitHub #17 & #18. |
152 |
| -* `Reader::open_readfile` no longer depends on `unsafe`. Pull request by |
| 143 | +- `Reader::open` has been removed. You should use `Reader::open_readfile` or |
| 144 | + `Reader::open_mmap`. Pull request by kpcyrd. GitHub #17 & #18. |
| 145 | +- `Reader::open_readfile` no longer depends on `unsafe`. Pull request by |
153 | 146 | kpcyrd. GitHub #17 & #18.
|
154 | 147 |
|
155 | 148 | ## 0.11.0 - 2018-11-12
|
156 | 149 |
|
157 |
| -* An optional `mmap` cfg feature flag has been added. When set, `open` |
158 |
| - will use the `memmap` crate to memory map the database file rather |
159 |
| - than reading it from file. In addition to `open`, `open_readfile` |
160 |
| - and `open_mmap` are available. PR by moschroe. GitHub #16. |
161 |
| -* `Reader::open` now takes an `AsRef<Path>`. Also, #16. |
162 |
| -* `Reader::from_buf` allows using an existing buffer instead of |
163 |
| - specifying a database file. PR by kpcyrd. GitHub #15. |
| 150 | +- An optional `mmap` cfg feature flag has been added. When set, `open` will use |
| 151 | + the `memmap` crate to memory map the database file rather than reading it |
| 152 | + from file. In addition to `open`, `open_readfile` and `open_mmap` are |
| 153 | + available. PR by moschroe. GitHub #16. |
| 154 | +- `Reader::open` now takes an `AsRef<Path>`. Also, #16. |
| 155 | +- `Reader::from_buf` allows using an existing buffer instead of specifying a |
| 156 | + database file. PR by kpcyrd. GitHub #15. |
164 | 157 |
|
165 | 158 | ## 0.10.0 - 2018-08-07
|
166 | 159 |
|
167 |
| -* Derive `Serialize` for GeoIP2 models. Pull request by Bryan Gilbert. |
168 |
| - GitHub #11. |
| 160 | +- Derive `Serialize` for GeoIP2 models. Pull request by Bryan Gilbert. GitHub |
| 161 | + #11. |
169 | 162 |
|
170 | 163 | ## 0.9.0 - 2018-02-16
|
171 | 164 |
|
172 |
| -* Update logger to 0.4 and env_logger to 0.5. |
| 165 | +- Update logger to 0.4 and env_logger to 0.5. |
173 | 166 |
|
174 | 167 | ## 0.8.1 - 2017-07-02
|
175 | 168 |
|
176 |
| -* Implement unimplemented deserialize methods. |
| 169 | +- Implement unimplemented deserialize methods. |
177 | 170 |
|
178 | 171 | ## 0.8.0 - 2017-06-28
|
179 | 172 |
|
180 |
| -* API CHANGE: Switch to Serde for deserialization. Data structures being |
| 173 | +- API CHANGE: Switch to Serde for deserialization. Data structures being |
181 | 174 | deserialized to must implement the `Deserialize` trait. Pull request by
|
182 | 175 | Wesley Moore. GitHub #5.
|
183 | 176 |
|
184 | 177 | ## 0.7.2 - 2017-04-16
|
185 | 178 |
|
186 |
| -* Update `log` to 0.3.7 and `rustc-serialize` to 0.3.23. |
| 179 | +- Update `log` to 0.3.7 and `rustc-serialize` to 0.3.23. |
187 | 180 |
|
188 | 181 | ## 0.7.1 - 2016-11-13
|
189 | 182 |
|
190 |
| -* Update `rustc-serialize` to 0.3.21. |
| 183 | +- Update `rustc-serialize` to 0.3.21. |
191 | 184 |
|
192 | 185 | ## 0.7.0 - 2016-05-15
|
193 | 186 |
|
194 |
| -* API CHANGE: `lookup` takes an `IpAddr` again instead of a `SocketAddr`. We |
| 187 | +- API CHANGE: `lookup` takes an `IpAddr` again instead of a `SocketAddr`. We |
195 | 188 | previously switched to `SocketAddr` after `IpAddr` had been deprecated, but
|
196 | 189 | it has since been re-added.
|
0 commit comments