1## Unreleased
2
3Released YYYY-MM-DD.
4
5### Added
6
7* TODO (or remove section if none)
8
9### Changed
10
11* TODO (or remove section if none)
12
13### Deprecated
14
15* TODO (or remove section if none)
16
17### Removed
18
19* TODO (or remove section if none)
20
21### Fixed
22
23* TODO (or remove section if none)
24
25### Security
26
27* TODO (or remove section if none)
28
29--------------------------------------------------------------------------------
30
31## 0.4.7
32
33Released 2020-10-14.
34
35### Added
36
37* Added an optimization to avoid unnecessarily consuming bytes from the
38  underlying data when there is only one possible choice in
39  `Unstructured::{int_in_range, choose, etc..}`.
40
41* Added license files to the derive crate.
42
43### Changed
44
45* The `Arbitrary` implementation for `std::time::Duration` should now be faster
46  and produce durations with a more-uniform distribution of nanoseconds.
47
48--------------------------------------------------------------------------------
49
50## 0.4.6
51
52Released 2020-08-22.
53
54### Added
55
56* Added the `Unstructured::peek_bytes` method.
57
58### Changed
59
60* Test case reduction via `cargo fuzz tmin` should be much more effective at
61  reducing the sizes of collections now. (See
62  [#53](https://github.com/rust-fuzz/arbitrary/pull/53) and the commit messages
63  for details.)
64
65* Fuzzing with mutation-based fuzzers (like libFuzzer) should be more efficient
66  now. (See [#53](https://github.com/rust-fuzz/arbitrary/pull/53) and the commit
67  messages for details)
68
69--------------------------------------------------------------------------------
70
71## 0.4.5
72
73Released 2020-06-18.
74
75### Added
76
77* Implement `Arbitrary` for zero length arrays.
78* Implement `Arbitrary` for `Range` and `RangeInclusive`.
79
80--------------------------------------------------------------------------------
81
82## 0.4.4
83
84Released 2020-04-29.
85
86### Fixed
87
88* Fixed the custom derive for enums when used via its full path (like
89  `#[derive(arbitrary::Arbitrary)]` rather than like `#[derive(Arbitrary)]`).
90
91
92## 0.4.3
93
94Released 2020-04-28.
95
96### Fixed
97
98* Fixed the custom derive when used via its full path (like
99  `#[derive(arbitrary::Arbitrary)]` rather than like `#[derive(Arbitrary)]`).
100
101--------------------------------------------------------------------------------
102
103## 0.4.2
104
105Released 2020-04-17.
106
107### Changed
108
109* We forgot to release a new version of the `derive_arbitrary` crate last
110  release. This release fixes that and so the `synstructure` dependency is
111  finally actually removed in the cargo releases.
112
113--------------------------------------------------------------------------------
114
115## 0.4.1
116
117Released 2020-03-18.
118
119### Removed
120
121* Removed an internal dependency on the `synstructure` crate when the `derive`
122  feature is enabled. This should not have any visible downstream effects other
123  than faster build times!
124
125--------------------------------------------------------------------------------
126
127## 0.4.0
128
129Released 2020-01-22.
130
131This is technically a breaking change, but we expect that nearly everyone should
132be able to upgrade without any compilation errors. The only exception is if you
133were implementing the `Arbitrary::size_hint` method by hand. If so, see the
134"changed" section below and the [API docs for
135`Arbitrary::shrink`](https://docs.rs/arbitrary/0.4.0/arbitrary/trait.Arbitrary.html#method.size_hint)
136for details.
137
138### Added
139
140* Added [the `arbitary::size_hint::recursion_guard` helper
141  function][recursion_guard] for guarding against infinite recursion in
142  `size_hint` implementations for recursive types.
143
144### Changed
145
146* The `Arbitrary::size_hint` signature now takes a `depth: usize`
147  parameter. This should be passed along unmodified to any nested calls of other
148  `size_hint` methods. If you're implementing `size_hint` for a recursive type
149  (like a linked list or tree) or a generic type with type parameters, you
150  should use [the new `arbitrary::size_hint::recursion_guard` helper
151  function][recursion_guard].
152
153### Fixed
154
155* Fixed infinite recursion in generated `size_hint` implementations
156  from `#[derive(Arbitrary)]` for recursive types.
157
158[recursion_guard]: https://docs.rs/arbitrary/0.4.0/arbitrary/size_hint/fn.recursion_guard.html
159
160--------------------------------------------------------------------------------
161
162## 0.3.2
163
164Released 2020-01-16.
165
166### Changed
167
168* Updated the custom derive's dependencies.
169
170--------------------------------------------------------------------------------
171
172## 0.3.2
173
174Released 2020-01-15.
175
176### Fixed
177
178* Fixed an over-eager assertion condition in `Unstructured::int_in_range` that
179  would incorrectly trigger when given valid ranges of length one.
180
181--------------------------------------------------------------------------------
182
183## 0.3.1
184
185Released 2020-01-14.
186
187### Fixed
188
189* Fixed some links and version numbers in README.
190
191--------------------------------------------------------------------------------
192
193## 0.3.0
194
195Released 2020-01-14.
196
197### Added
198
199* Added the `"derive"` cargo feature, to enable `#[derive(Arbitrary)]` for
200  custom types. Enabling this feature re-exports functionality from the
201  `derive_arbitrary` crate.
202* The custom derive for `Arbitrary` implements the shrink method for you now.
203* All implementations of `Arbitrary` for `std` types implement shrinking now.
204* Added the `Arbitrary::arbitrary_take_rest` method allows an `Arbitrary`
205  implementation to consume all of the rest of the remaining raw input. It has a
206  default implementation that forwards to `Arbitrary::arbitrary` and the custom
207  derive creates a smart implementation for your custom types.
208* Added the `Arbitrary::size_hint` method for hinting how many raw bytes an
209  implementation needs to construct itself. This has a default implementation,
210  but the custom derive creates a smart implementation for your custom types.
211* Added the `Unstructured::choose` method to choose one thing among a set of
212  choices.
213* Added the `Unstructured::arbitrary_len` method to get an arbitrary length for
214  a collection of some arbitrary type.
215* Added the `Unstructured::arbitrary_iter` method to create an iterator of
216  arbitrary instance of some type.
217
218### Changed
219
220* The `Arbitrary` trait was simplified a bit.
221* `Unstructured` is a concrete type now, not a trait.
222* Switched to Rust 2018 edition.
223
224### Removed
225
226* `RingBuffer` and `FiniteBuffer` are removed. Use `Unstructured` instead.
227
228### Fixed
229
230* Better `Arbitrary` implementation for `char`.
231* Better `Arbitrary` implementation for `String`.
232
233--------------------------------------------------------------------------------
234
235## 0.2.0
236
237--------------------------------------------------------------------------------
238
239## 0.1.0
240