Skip to content

Commit 0f6b55e

Browse files
committed
Reformat changelog
1 parent 1023bab commit 0f6b55e

File tree

1 file changed

+101
-108
lines changed

1 file changed

+101
-108
lines changed

CHANGELOG.md

Lines changed: 101 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,196 +1,189 @@
1-
# Change Log #
1+
# Change Log
22

33
## 0.26.0 - 2025-03-28
44

5-
* **BREAKING CHANGE:** The `lookup` and `lookup_prefix` methods now return
5+
- **BREAKING CHANGE:** The `lookup` and `lookup_prefix` methods now return
66
`Ok(None)` or `Ok((None, prefix_len))` respectively when an IP address is
77
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
3533
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.
3936

4037
## 0.25.0 - 2025-02-16
4138

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.
5046

5147
## 0.24.0 - 2024-01-09
5248

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.
5551

5652
## 0.23.0 - 2022-04-03
5753

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.
6156

6257
## 0.22.0 - 2022-03-23
6358

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.
7468

7569
## 0.21.0 - 2021-07-20
7670

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.
7973

8074
## 0.20.0 - 2021-07-11
8175

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.
8478

8579
## 0.19.0 - 2021-06-25
8680

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.
8983

9084
## 0.18.0 - 2021-05-29
9185

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.
9488

9589
## 0.17.3 - 2021-05-29
9690

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.
10195

10296
## 0.17.2 - 2021-02-11
10397

104-
* Minor cleanup.
98+
- Minor cleanup.
10599

106100
## 0.17.1 - 2021-01-03
107101

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.
110104

111105
## 0.17.0 - 2020-12-12
112106

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.
115109

116110
## 0.16.0 - 2020-12-05
117111

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.
120114

121115
## 0.15.0 - 2020-10-10
122116

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.
126120

127121
## 0.14.0 - 2020-06-07
128122

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.
132130
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.
139132

140133
## 0.13.0 - 2019-01-21
141134

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
146139
`MaxMindDBError`. Pull request by Mike Cooper. GitHub #20.
147140

148141
## 0.12.0 - 2018-12-09
149142

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
153146
kpcyrd. GitHub #17 & #18.
154147

155148
## 0.11.0 - 2018-11-12
156149

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.
164157

165158
## 0.10.0 - 2018-08-07
166159

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.
169162

170163
## 0.9.0 - 2018-02-16
171164

172-
* Update logger to 0.4 and env_logger to 0.5.
165+
- Update logger to 0.4 and env_logger to 0.5.
173166

174167
## 0.8.1 - 2017-07-02
175168

176-
* Implement unimplemented deserialize methods.
169+
- Implement unimplemented deserialize methods.
177170

178171
## 0.8.0 - 2017-06-28
179172

180-
* API CHANGE: Switch to Serde for deserialization. Data structures being
173+
- API CHANGE: Switch to Serde for deserialization. Data structures being
181174
deserialized to must implement the `Deserialize` trait. Pull request by
182175
Wesley Moore. GitHub #5.
183176

184177
## 0.7.2 - 2017-04-16
185178

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.
187180

188181
## 0.7.1 - 2016-11-13
189182

190-
* Update `rustc-serialize` to 0.3.21.
183+
- Update `rustc-serialize` to 0.3.21.
191184

192185
## 0.7.0 - 2016-05-15
193186

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
195188
previously switched to `SocketAddr` after `IpAddr` had been deprecated, but
196189
it has since been re-added.

0 commit comments

Comments
 (0)