Debian Codegraph @

.cargo/vendor/widestring/CHANGELOG.md

raw
1 # Changelog
2
3 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
4 and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
5
6 ## [Unreleased]
7
8 ## [1.1.0] - 2022-04-06 <a name="1.1.0"></a>
9 ### Added
10 - `Utf32String::into_char_vec` and missing conversion to `Vec<char>` for `Utf32String`. Fixes [#37].
11 - `include_utf16str!` macro to include UTF-16 file at compile-time as `Utf16Str`. By [@daxpedda].
12
13 ### Fixed
14 - `U16String::pop_char` panics with surrogate string. Fixes [#38].
15 - Various import warnings and new clippy warnings, plus stabilized debugger visualizer warnings.
16
17 ## [1.0.2] - 2022-07-15 <a name="1.0.2"></a>
18 ### Fixed
19 - Correctly check for and error on nul values in C-string macros `u16cstr!`, `u32cstr!`, and
20 `widecstr!`. Fixes [#28].
21
22 ## [1.0.1] - 2022-06-24 <a name="1.0.1"></a>
23 ### Fixed
24 - Reduce collision potential for macros. By [@OpenByteDev].
25
26 ## [1.0.0] - 2022-06-21 <a name="1.0.0"></a>
27 ### Changed
28 - **Breaking Change** Minimum supported Rust version is now 1.58.
29 - Added `#[must_use]` attributes to many crate functions, as appropriate.
30 - Remove `unsafe` qualifiers from `as_mut_ptr` and `as_mut_ptr_range` to match standard library. By
31 [@yescallop].
32
33 ### Added
34 - Added `new` function that creates and empty string to `U16CString` and `U32CString` to match other
35 string types.
36 - Additional `From` implementations for conversion to `OsString`.
37
38 ## [1.0.0-beta.1] - 2021-11-08 <a name="1.0.0-beta.1"></a>
39 ### Changed
40 - **Breaking Change** Minimum supported Rust version is now 1.56.
41 - **Breaking Change** The following methods on `U16String` and `U32String` have been renamed and
42 replaced by functions with different semantics:
43 - `pop` is now `pop_char`
44 - `remove` is now `remove_char`
45 - `insert` is now `insert_char`
46 - **Breaking Change** Moved and renamed the following iterator types:
47 - `iter::Utf16Chars` renamed to `CharsUtf16` and moved to `ustr` and `ucstr`
48 - `iter::Utf32Chars` renamed to `CharsUtf32` and moved to `ustr` and `ucstr`
49 - `iter::CharsLossy` split and renamed to `CharsLossyUtf16` and `CharsLossyUtf32` and moved to
50 `ustr` and `ucstr`
51 - `iter::Utf16CharIndices` renamed to `CharIndicesUtf16` and moved to `ustr` and `ucstr`
52 - `iter::Utf16CharIndicesLossy` renamed to `CharIndicesLossyUtf16` and moved to `ustr` and `ucstr`
53 - **Breaking Change** `error::FromUtf16Error` and `error::FromUtf32Error` has been renamed to
54 `Utf16Error` and `Utf32Error` respectively and expanded with more details about the error.
55 - Migrated crate to Rust 2021 edition.
56 - The following methods on `U16Str` and `U32Str` are now `const`:
57 - `from_slice`
58 - `as_slice`
59 - `as_ptr`
60 - `len`
61 - `is_empty`
62 - The following methods on `U16CStr` and `U32CStr` are now `const`:
63 - `from_slice_unchecked`
64 - `as_slice_with_nul`
65 - `as_ptr`
66 - `len`
67 - `is_empty`
68 - The following methods on `U16String` and `U32String` are now `const`:
69 - `new`
70
71 ### Added
72 - Added new UTF-encoded string types and associated types:
73 - `Utf16Str`
74 - `Utf32Str`
75 - `Utf16String`
76 - `Utf32String`
77 - Added macros to convert string literals into `const` wide string slices:
78 - `u16str!`
79 - `u16cstr!`
80 - `u32str!`
81 - `u32cstr!`
82 - `widestr!`
83 - `widecstr!`
84 - `utf16str!`
85 - `utf32str!`
86 - Added `NUL_TERMINATOR` associated constant to `U16CStr`, `U32CStr`, `U16CString`, and
87 `U32CString`.
88 - Added `DoubleEndedIterator` and `ExactSizeIterator` implementations to a number of iterator types.
89 - Added new UTF encoding functions alongside existing decode functions:
90 - `encode_utf8`
91 - `encode_utf16`
92 - `encode_utf32`
93 - Added various methods:
94 - `repeat` on `U16Str`, `U32Str`, `U16CStr`, and `U32CStr`
95 - `shrink_to` on `U16String` and `U32String`
96 - `retain` on `U16String` and `U32String`
97 - `drain` on `U16String` and `U32String`
98 - `replace_range` on `U16String` and `U32String`
99 - `get`, `get_mut`, `get_unchecked`, and `get_unchecked_mut` on `U16CStr` and `U32CStr`
100 - `split_at` and `split_at_mut` on `U16CStr` and `U32CStr`
101 - Added more trait implementations.
102
103 ### Removed
104 - **Breaking Change** Functions and types deprecated in 0.5 have been removed.
105 - **Breaking Change** The following types and traits, which were implementation details, have been
106 removed. Use the existing non-generic types instead (e.g. use `U16Str` instead of `UStr<u16>`).
107 - `UChar`
108 - `UStr`
109 - `UCStr`
110 - `UString`
111 - `UCString`
112 - **Breaking Change** Removed `IndexMut<RangeFull>` trait implementation of `U16CString` and
113 `U32CString`. Use the unsafe `get_mut` method instead, which also supports more ranges.
114
115 ### Fixed
116 - **Breaking Change** The iterator returned by `U16Str::char_indices` and `U16CStr::char_indices`
117 is now over `(usize, Result<char, DecodeUtf16Error>)` tuples instead of the reverse order, to
118 better match standard library string iterators. The same is true of `U16Str::char_indices_lossy`
119 and `U16CStr::char_indices_lossy`. This matches what was stated in original documentation.
120 - `U32Str::to_string` and `U32CStr::to_string` now only allocate once instead of twice.
121
122 ## [0.5.1] - 2021-10-23 <a name="0.5.1"></a>
123 ### Fixed
124 - Fixed a regression in 0.5.0 where zero-length vectors and strings were incorrectly causing panics
125 in `UCString::from_vec` and `UCString::from_str`. Fixes [#22].
126 - Modified an implentation detail in `ustr::to_string` & `ustr::to_string_lossy` to remove possibly
127 unsafe behaviour.
128
129 ## [0.5.0] - 2021-10-12 <a name="0.5.0"></a>
130 ### Changed
131 - **Breaking Change** Minimum supported Rust version is now 1.48.
132 - **Breaking Change** Renamed a number of types and functions to increase consistency and clarity.
133 This also meant renaming errors to more clearly convey error and trying to be more consistent with
134 name conventions and functionality across types. Check renamed function docs for any changes in
135 functionality, as there have been some minor tweaks (mostly relaxing/removing error conditions and
136 reducing panics). Old names have been deprecated to ease transition and will be removed in a
137 future release. Fixes [#18].
138 - `MissingNulError` => `error::MissingNulTerminator`
139 - `FromUtf32Error` => `error::FromUtf32Error`
140 - `NulError` => `error::ContainsNul`
141 - `UCStr::from_ptr_with_nul` => `from_ptr_unchecked`
142 - `UCStr::from_slice_with_nul` => `from_slice_truncate`
143 - `UCStr::from_slice_with_nul_unchecked` => `from_slice_unchecked`
144 - `U32CStr::from_char_ptr_with_nul` => `from_char_ptr_unchecked`
145 - `U32CStr::from_char_slice_with_nul` => `from_char_slice_truncate`
146 - `U32CStr::from_char_slice_with_nul_unchecked` => `from_char_slice_unchecked`
147 - `UCString::new` => `from_vec`
148 - `UCString::from_vec_with_nul` => `from_vec_truncate`
149 - `UCString::from_ustr_with_nul` => `from_ustr_truncate`
150 - `UCString::from_ptr_with_nul` => `from_ptr_truncate`
151 - `UCString::from_str_with_nul` => `from_str_truncate`
152 - `UCString::from_os_str_with_nul` => `from_os_str_truncate`
153 - `U32CString::from_chars_with_nul` => `from_chars_truncate`
154 - `U32CString::from_char_ptr_with_nul` => `from_char_ptr_truncate`
155 - Improved implementations in some areas to reduce unncessary double allocations.
156 - Improved `Debug` implementations. No more debugging lists of raw integer values.
157 - Migrated crate to Rust 2018 edition.
158 - Made crate package [REUSE compliant](https://reuse.software/).
159 - Improved documentation and used intra-doc links.
160
161 ### Added
162 - Added crate-level functions `decode_utf16`, `decode_utf16_lossy`, `decode_utf32`, and
163 `decode_utf32_lossy` and associated iterators. Note that `decode_utf16` is an alias of
164 `core::char::decode_utf16`, but provided for consistency.
165 - Added `display` method to to both `UStr` and `UCStr` to display strings in formatting without heap
166 allocations, similar to `Path::display`. Fixes [#20].
167 - Added more trait implementations, including more index operations and string formatting via
168 `Write` trait. Fixes [#19].
169 - Added new functions:
170 - `UStr::from_ptr_mut`
171 - `UStr::from_slice_mut`
172 - `UStr::as_mut_slice`
173 - `UStr::as_mut_ptr`
174 - `UStr::as_ptr_range`
175 - `UStr::as_mut_ptr_range`
176 - `UStr::get`
177 - `UStr::get_mut`
178 - `UStr::get_unchecked`
179 - `UStr::get_unchecked_mut`
180 - `UStr::split_at`
181 - `UStr::split_at_mut`
182 - `UStr::chars`
183 - `UStr::chars_lossy`
184 - `U16Str::char_indices`
185 - `U16Str::char_indices_lossy`
186 - `U32Str::from_char_ptr_mut`
187 - `U32Str::from_char_slice_mut`
188 - `UCStr::from_ptr`
189 - `UCStr::from_ptr_truncate`
190 - `UCStr::from_slice`
191 - `UCStr::as_ustr`
192 - `UCStr::from_ptr_str_mut`
193 - `UCStr::from_ptr_mut`
194 - `UCStr::from_ptr_truncate_mut`
195 - `UCStr::from_ptr_unchecked_mut`
196 - `UCStr::from_slice_mut`
197 - `UCStr::from_slice_truncate_mut`
198 - `UCStr::from_slice_unchecked_mut`
199 - `UCStr::as_mut_slice`
200 - `UCStr::as_mut_ptr`
201 - `UCStr::as_ustr_with_nul`
202 - `UCStr::as_mut_ustr`
203 - `UCStr::as_ptr_range`
204 - `UCStr::as_mut_ptr_range`
205 - `UCStr::chars`
206 - `UCStr::chars_lossy`
207 - `U16CStr::char_indices`
208 - `U16CStr::char_indices_lossy`
209 - `U32CStr::from_char_ptr_str_mut`
210 - `U32CStr::from_char_ptr_mut`
211 - `U32CStr::from_char_ptr_truncate_mut`
212 - `U32CStr::from_char_ptr_unchecked_mut`
213 - `U32CStr::from_char_slice_mut`
214 - `U32CStr::from_char_slice_truncate_mut`
215 - `U32CStr::from_char_slice_unchecked_mut`
216 - `U32CStr::from_char_ptr`
217 - `U32CStr::from_char_ptr_truncate`
218 - `U32CStr::from_char_slice`
219 - `UString::as_vec`
220 - `UString::as_mut_vec`
221 - `UString::push_char`
222 - `UString::truncate`
223 - `UString::pop`
224 - `UString::remove`
225 - `UString::insert`
226 - `UString::insert_ustr`
227 - `UString::split_off`
228 - `UCString::as_mut_ucstr`
229 - `UCString::into_ustring`
230 - `UCString::into_ustring_with_nul`
231 - `U32CString::from_char_ptr_str`
232
233 ### Deprecated
234 - Deprecated functions as part of simplifying to increase clarity. These will be removed entirely
235 in a future release.
236 - `MissingNulError`. Use `error::MissingNulTerminator` instead.
237 - `FromUtf32Error`. Use `error::FromUtf32Error` instead.
238 - `NulError`. Use `error::ContainsNul` instead.
239 - `UCStr::from_ptr_with_nul`. Use `from_ptr_unchecked` instead.
240 - `UCStr::from_slice_with_nul`. Use `from_slice_truncate` instead.
241 - `UCStr::from_slice_with_nul_unchecked`. Use `from_slice_unchecked` instead.
242 - `U32CStr::from_char_ptr_with_nul`. Use `from_char_ptr_unchecked` instead.
243 - `U32CStr::from_char_slice_with_nul`. Use `from_char_slice_truncate` instead.
244 - `U32CStr::from_char_slice_with_nul_unchecked`. Use `from_char_slice_unchecked` instead.
245 - `UCString::new`. Use `from_vec` instead.
246 - `UCString::from_vec_with_nul_unchecked`. Use `from_vec_unchecked` instead.
247 - `UCString::from_ustr_with_nul_unchecked`. Use `from_ustr_unchecked` instead.
248 - `UCString::from_ptr_with_nul_unchecked`. Use `from_ptr_unchecked` instead.
249 - `UCString::from_str_with_nul_unchecked`. Use `from_str_unchecked` instead.
250 - `UCString::from_os_str_with_nul_unchecked`. Use `from_os_str_unchecked` instead.
251 - `UCString::from_vec_with_nul`. Use `from_vec_truncate` instead.
252 - `UCString::from_ustr_with_nul`. Use `from_ustr_truncate` instead.
253 - `UCString::from_ptr_with_nul`. Use `from_ptr_truncate` instead.
254 - `UCString::from_str_with_nul`. Use `from_str_truncate` instead.
255 - `UCString::from_os_str_with_nul`. Use `from_os_str_truncate` instead.
256 - `U32CString::from_chars_with_nul_unchecked`. Use `from_chars_unchecked` instead.
257 - `U32CString::from_char_ptr_with_nul_unchecked`. Use `from_char_ptr_unchecked` instead.
258 - `U32CString::from_chars_with_nul`. Use `from_chars_truncate` instead.
259 - `U32CString::from_char_ptr_with_nul`. Use `from_char_ptr_truncate` instead.
260 - Deprecated error types in the crate root. Use the errors directly from `error` module instead.
261
262 ## [0.4.3] - 2020-10-05 <a name="0.4.3"></a>
263 ### Fixed
264 - Fixed undefined behaviours and cleaned up clippy warnings. By [@joshwd36].
265
266 ## [0.4.2] - 2020-06-09 <a name="0.4.2"></a>
267 ### Fixed
268 - Fixed compile errors on pre-1.36.0 Rust due to unstable `alloc` crate. Minimum supported version
269 is Rust 1.34.2, the rust version for Debian stable. Fixes [#14].
270
271 ## [0.4.1] - 2020-06-08 <a name="0.4.1"></a>
272 ### ***Yanked***
273 ### Changed
274 - Now supports `no_std`. Added the `std` and `alloc` features, enabled by default. `U16String`,
275 `U32String`, `U16CString`, and `U32CString` and their aliases all require the `alloc` or `std`
276 feature. By [@nicbn].
277
278 ## [0.4.0] - 2018-08-18 <a name="0.4.0"></a>
279 ### Added
280 - New `U32String`, `U32Str`, `U32CString`, and `U32CStr` types for dealing with UTF-32 FFI. These
281 new types are roughly equivalent to the existing UTF-16 types.
282 - `WideChar` is a type alias to `u16` on Windows but `u32` on non-Windows platforms.
283 - The generic types `UString`, `UStr`, `UCString` and `UCStr` are used to implement the string
284 types.
285
286 ### Changed
287 - **Breaking Change** Existing wide string types have been renamed to `U16String`, `U16Str`,
288 `U16CString`, and `U16CStr` (previously `WideString`, `WideStr`, etc.). Some function have
289 also been renamed to reflect this change (`wide_str` to `u16_str`, etc.).
290 - **Breaking Change** `WideString`, `WideStr`, `WideCString`, and `WideCStr` are now type aliases
291 that vary between platforms. On Windows, these are aliases to the `U16` types and are equivalent
292 to the previous version, but on non-Windows platforms these alias the new `U32` types instead.
293 See crate documentation for more details.
294
295 ## [0.3.0] - 2018-03-17 <a name="0.3.0"></a>
296 ### Added
297 - Additional unchecked functions on `WideCString`.
298 - All types now implement `Default`.
299 - `WideString::shrink_to_fit`
300 - `WideString::into_boxed_wide_str` and `Box<WideStr>::into_wide_string`.
301 - `WideCString::into_boxed_wide_c_str` and `Box<WideCStr>::into_wide_c_string`.
302 - `From` and `Default` implementations for boxed `WideStr` and boxed `WideCStr`.
303
304 ### Changed
305 - Renamed `WideCString::from_vec` to replace `WideCString::new`. To create empty string, use
306 `WideCString::default()` now.
307 - `WideCString` now implements `Drop`, which sets the string to an empty string to prevent invalid
308 unsafe code from working correctly when it should otherwise break. Also see `Drop` implementation
309 of `CString`.
310 - Writing changelog manually.
311 - Upgraded winapi dev dependency.
312 - Now requires at least Rust 1.17+ to compile (previously, was Rust 1.8).
313
314 ## [0.2.2] - 2016-09-09 <a name="0.2.2"></a>
315 ### Fixed
316 - Make `WideCString::into_raw` correctly forget the original self.
317
318 ## [0.2.1] - 2016-08-12 <a name="0.2.1"></a>
319 ### Added
320 - `into_raw`/`from_raw` on `WideCString`. Closes [#2].
321
322 ## [0.2.0] - 2016-05-31 <a name="0.2.0"></a>
323 ### Added
324 - `Default` trait to wide strings.
325 - Traits for conversion of strings to `Cow`.
326 ### Changed
327 - Methods & traits to bring to parity with Rust 1.9 string APIs.
328
329 ## 0.1.0 - 2016-02-06 <a name="0.1.0"></a>
330 ### Added
331 - Initial release.
332
333 [#2]: https://github.com/starkat99/widestring-rs/issues/2
334 [#14]: https://github.com/starkat99/widestring-rs/issues/14
335 [#18]: https://github.com/starkat99/widestring-rs/issues/18
336 [#19]: https://github.com/starkat99/widestring-rs/issues/19
337 [#20]: https://github.com/starkat99/widestring-rs/issues/20
338 [#22]: https://github.com/starkat99/widestring-rs/issues/22
339 [#28]: https://github.com/starkat99/widestring-rs/issues/28
340 [#37]: https://github.com/starkat99/widestring-rs/issues/37
341 [#38]: https://github.com/starkat99/widestring-rs/issues/38
342
343 [@nicbn]: https://github.com/nicbn
344 [@joshwd36]: https://github.com/joshwb36
345 [@yescallop]: https://github.com/yescallop
346 [@OpenByteDev]: https://github.com/OpenByteDev
347 [@daxpedda]: https://github.com/daxpedda
348
349 [Unreleased]: https://github.com/starkat99/widestring-rs/compare/v1.1.0...HEAD
350 [1.1.0]: https://github.com/starkat99/widestring-rs/compare/v1.0.2...v1.1.0
351 [1.0.2]: https://github.com/starkat99/widestring-rs/compare/v1.0.1...v1.0.2
352 [1.0.1]: https://github.com/starkat99/widestring-rs/compare/v1.0.0...v1.0.1
353 [1.0.0]: https://github.com/starkat99/widestring-rs/compare/v1.0.0-beta.1...v1.0.0
354 [1.0.0-beta.1]: https://github.com/starkat99/widestring-rs/compare/v0.5.1...v1.0.0-beta.1
355 [0.5.1]: https://github.com/starkat99/widestring-rs/compare/v0.5.0...v0.5.1
356 [0.5.0]: https://github.com/starkat99/widestring-rs/compare/v0.4.3...v0.5.0
357 [0.4.3]: https://github.com/starkat99/widestring-rs/compare/v0.4.2...v0.4.3
358 [0.4.2]: https://github.com/starkat99/widestring-rs/compare/v0.4.1...v0.4.2
359 [0.4.1]: https://github.com/starkat99/widestring-rs/compare/v0.4.0...v0.4.1
360 [0.4.0]: https://github.com/starkat99/widestring-rs/compare/v0.3.0...v0.4.0
361 [0.3.0]: https://github.com/starkat99/widestring-rs/compare/v0.2.2...v0.3.0
362 [0.2.2]: https://github.com/starkat99/widestring-rs/compare/v0.2.1...v0.2.2
363 [0.2.1]: https://github.com/starkat99/widestring-rs/compare/v0.2.0...v0.2.1
364 [0.2.0]: https://github.com/starkat99/widestring-rs/compare/v0.1.0...v0.2.0