| 1 | Version 1.1.0 (2022-09-18) |
| 2 | ========================== |
| 3 | * Add alloc feature. |
| 4 | This enables `AsciiString` and methods that take or return `Box<[AsciiStr]>` in `!#[no_std]`-mode. |
| 5 | * Add `AsciiStr::into_ascii_string()`, `AsciiString::into_boxed_ascii_str()` and `AsciiString::insert_str()`. |
| 6 | * Implement `From<Box<AsciiStr>>` and `From<AsciiChar>` for `AsciiString`. |
| 7 | * Implement `From<AsciiString>` for `Box<AsciiStr>`, `Rc<AsciiStr>`, `Arc<AsciiStr>` and `Vec<AsciiChar>`. |
| 8 | * Make `AsciiString::new()`, `AsciiStr::len()` and `AsciiStr::is_empty()` `const fn`. |
| 9 | * Require Rust 1.44.1. |
| 10 | |
| 11 | Version 1.0.0 (2019-08-26) |
| 12 | ========================== |
| 13 | |
| 14 | Breaking changes: |
| 15 | |
| 16 | * Change `AsciiChar.is_whitespace()` to also return true for '\0xb' (vertical tab) and '\0xc' (form feed). |
| 17 | * Remove quickcheck feature. |
| 18 | * Remove `AsciiStr::new()`. |
| 19 | * Rename `AsciiChar::from()` and `AsciiChar::from_unchecked()` to `from_ascii()` and `from_ascii_unchecked()`. |
| 20 | * Rename several `AsciiChar.is_xxx()` methods to `is_ascii_xxx()` (for comsistency with std). |
| 21 | * Rename `AsciiChar::Null` to `Nul` (for consistency with eg. `CStr::from_bytes_with_nul()`). |
| 22 | * Rename `AsciiStr.trim_left()` and `AsciiStr.trim_right()` to `trim_start()` and `trim_end()`. |
| 23 | * Remove impls of the deprecated `std::ascii::AsciiExt` trait. |
| 24 | * Change iterators `Chars`, `CharsMut` and `CharsRef` from type aliases to newtypes. |
| 25 | * Return `impl Trait` from `AsciiStr.lines()` and `AsciiStr.split()`, and remove iterator types `Lines` and `Split`. |
| 26 | * Add `slice_ascii_str()`, `get_ascii()` and `unwrap_ascii()` to the `AsAsciiStr` trait. |
| 27 | * Add `slice_mut_ascii_str()` and `unwrap_ascii_mut()` to the `AsMutAsciiStr` trait. |
| 28 | * Require Rust 1.33.0 for 1.0.\*, and allow later semver-compatible 1.y.0 releases to increase it. |
| 29 | |
| 30 | Additions: |
| 31 | |
| 32 | * Add `const fn` `AsciiChar::new()` which panicks on invalid values. |
| 33 | * Make most `AsciiChar` methods `const fn`. |
| 34 | * Add multiple `AsciiChar::is_[ascii_]xxx()` methods. |
| 35 | * Implement `AsRef<AsciiStr>` for `AsciiChar`. |
| 36 | * Make `AsciiString`'s `Extend` and `FromIterator` impl generic over all `AsRef<AsciiStr>`. |
| 37 | * Implement inclusive range indexing for `AsciiStr` (and thereby `AsciiString`). |
| 38 | * Mark `AsciiStr` and `AsciiString` `#[repr(transparent)]` (to `[AsciiChar]` and `Vec<AsciiChar>` respectively). |
| 39 | |
| 40 | Version 0.9.3 (2019-08-26) |
| 41 | ========================== |
| 42 | |
| 43 | Soundness fix: |
| 44 | |
| 45 | **Remove** [unsound](https://github.com/tomprogrammer/rust-ascii/issues/64) impls of `From<&mut AsciiStr>` for `&mut [u8]` and `&mut str`. |
| 46 | This is a breaking change, but theese impls can lead to undefined behavior in safe code. |
| 47 | |
| 48 | If you use this impl and know that non-ASCII values are never inserted into the `[u8]` or `str`, |
| 49 | you can pin ascii to 0.9.2. |
| 50 | |
| 51 | Other changes: |
| 52 | |
| 53 | * Make quickcheck `Arbitrary` impl sometimes produce `AsciiChar::DEL`. |
| 54 | * Implement `Clone`, `Copy` and `Eq` for `ToAsciiCharError`. |
| 55 | * Implement `ToAsciiChar` for `u16`, `u32` and `i8`. |
| 56 | |
| 57 | Version 0.9.2 (2019-07-07) |
| 58 | ========================== |
| 59 | * Implement the `IntoAsciiString` trait for `std::ffi::CStr` and `std::ffi::CString` types, |
| 60 | and implemented the `AsAsciiStr` trait for `std::ffi::CStr` type. |
| 61 | * Implement the `IntoAsciiString` for `std::borrow::Cow`, where the inner types themselves |
| 62 | implement `IntoAsciiString`. |
| 63 | * Implement conversions between `AsciiString` and `Cow<'a, AsciiStr>`. |
| 64 | * Implement the `std::ops::AddAssign` trait for `AsciiString`. |
| 65 | * Implement `BorrowMut<AsciiStr>`, `AsRef<[AsciiChar]>`, `AsRef<str>`, `AsMut<[AsciiChar]>` for `AsciiString`. |
| 66 | * Implement `PartialEq<[u8]>` and `PartialEq<[AsciiChar]>` for `AsciiStr`. |
| 67 | * Add `AsciiStr::first()`, `AsciiStr::last()` and `AsciiStr::split()` methods. |
| 68 | * Implement `DoubleEndedIterator` for `AsciiStr::lines()`. |
| 69 | * Implement `AsRef<AsciiStr>` and `AsMut<AsciiStr` for `[AsciiChar]`. |
| 70 | * Implement `Default` for `AsciiChar`. |
| 71 | |
| 72 | Version 0.9.1 (2018-09-12) |
| 73 | ========================== |
| 74 | * Implement the `serde::Serialize` and `serde::Deserialize` traits for `AsciiChar`, `AsciiStr`, and `AsciiString`. |
| 75 | The implementation is enabled by the `serde` feature. |
| 76 | * **Bugfix**: `AsciiStr::lines()` now behaves similar to `str::lines()`. |
| 77 | ([#51](https://github.com/tomprogrammer/rust-ascii/issues/51)) |
| 78 | |
| 79 | Version 0.9.0 (2018-04-05) |
| 80 | ========================== |
| 81 | * Update the optional `quickcheck` feature to version 0.6. |
| 82 | |
| 83 | Version 0.8.7 (2018-04-04) |
| 84 | ========================== |
| 85 | * Implement `AsAsciiStr` and `AsMutAsciiStr` for references to to types that implement them. |
| 86 | * Make all methods of deprecated `AsciiExt` except `is_ascii()` available as inherent methods in std-mode. |
| 87 | * Compile without warnings on Rust 1.26.0 |
| 88 | * Acknowledge that the crate doesn't compile on Rust < 1.8.0 (cannot be fixed without breaking changes). |
| 89 | |
| 90 | Version 0.8.6 (2017-07-02) |
| 91 | ========================== |
| 92 | * Implement `AsRef<u8> for AsciiString`. |
| 93 | |
| 94 | Version 0.8.4 (2017-04-18) |
| 95 | ========================== |
| 96 | * Fix the tests when running without std. |
| 97 | |
| 98 | Version 0.8.3 (2017-04-18) |
| 99 | ========================== |
| 100 | * Bugfix: `<AsciiStr as AsciiExt>::to_ascii_lowercase` did erroneously convert to uppercase. |
| 101 | |
| 102 | Version 0.8.2 (2017-04-17) |
| 103 | ========================== |
| 104 | * Implement `IntoAsciiString` for `&'a str` and `&'a [u8]`. |
| 105 | * Implement the `quickcheck::Arbitrary` trait for `AsciiChar` and `AsciiString`. |
| 106 | The implementation is enabled by the `quickcheck` feature. |
| 107 | |
| 108 | Version 0.8.1 (2017-02-11) |
| 109 | ========================== |
| 110 | * Add `Chars`, `CharsMut` and `Lines` iterators. |
| 111 | * Implement `std::fmt::Write` for `AsciiString`. |
| 112 | |
| 113 | Version 0.8.0 (2017-01-02) |
| 114 | ========================== |
| 115 | |
| 116 | Breaking changes: |
| 117 | |
| 118 | * Return `FromAsciiError` instead of the input when `AsciiString::from_ascii()` or `into_ascii_string()` fails. |
| 119 | * Replace the `no_std` feature with the additive `std` feature, which is part of the default features. (Issue #29) |
| 120 | * `AsciiChar::is_*()` and `::as_{byte,char}()` take `self` by value instead of by reference. |
| 121 | |
| 122 | Additions: |
| 123 | |
| 124 | * Make `AsciiChar` comparable with `char` and `u8`. |
| 125 | * Add `AsciiChar::as_printable_char()` and the free functions `caret_encode()` and `caret_decode()`. |
| 126 | * Implement some methods from `AsciiExt` and `Error` (which are not in libcore) directly in `core` mode: |
| 127 | * `Ascii{Char,Str}::eq_ignore_ascii_case()` |
| 128 | * `AsciiChar::to_ascii_{upper,lower}case()` |
| 129 | * `AsciiStr::make_ascii_{upper,lower}case()` |
| 130 | * `{ToAsciiChar,AsAsciiStr}Error::description()` |
| 131 | |
| 132 | Version 0.7.1 (2016-08-15) |
| 133 | ========================== |
| 134 | * Fix the implementation of `AsciiExt::to_ascii_lowercase()` for `AsciiChar` converting to uppercase. (introduced in 0.7.0) |
| 135 | |
| 136 | Version 0.7.0 (2016-06-25) |
| 137 | ========================== |
| 138 | * Rename `Ascii` to `AsciiChar` and convert it into an enum. |
| 139 | (with a variant for every ASCII character) |
| 140 | * Replace `OwnedAsciiCast` with `IntoAsciiString`. |
| 141 | * Replace `AsciiCast` with `As[Mut]AsciiStr` and `IntoAsciiChar`. |
| 142 | * Add *from[_ascii]_unchecked* methods. |
| 143 | * Replace *from_bytes* with *from_ascii* in method names. |
| 144 | * Return `std::error::Error`-implementing types instead of `()` and `None` when |
| 145 | conversion to `AsciiStr` or `AsciiChar` fails. |
| 146 | * Implement `AsciiExt` without the `unstable` Cargo feature flag, which is removed. |
| 147 | * Require Rust 1.9 or later. |
| 148 | * Add `#[no_std]` support in a Cargo feature. |
| 149 | * Implement `From<{&,&mut,Box<}AsciiStr>` for `[Ascii]`, `[u8]` and `str` |
| 150 | * Implement `From<{&,&mut,Box<}[Ascii]>`, `As{Ref,Mut}<[Ascii]>` and Default for `AsciiStr` |
| 151 | * Implement `From<Vec<Ascii>>` for `AsciiString`. |
| 152 | * Implement `AsMut<AsciiStr>` for `AsciiString`. |
| 153 | * Stop some `Ascii::is_xxx()` methods from panicking. |
| 154 | * Add `Ascii::is_whitespace()`. |
| 155 | * Add `AsciiString::as_mut_slice()`. |
| 156 | * Add raw pointer methods on `AsciiString`: |
| 157 | * `from_raw_parts` |
| 158 | * `as_ptr` |
| 159 | * `as_mut_ptr` |
| 160 | |
| 161 | Version 0.6.0 (2015-12-30) |
| 162 | ========================== |
| 163 | * Add `Ascii::from_byte()` |
| 164 | * Add `AsciiStr::trim[_{left,right}]()` |
| 165 | |
| 166 | Version 0.5.4 (2015-07-29) |
| 167 | ========================== |
| 168 | Implement `IndexMut` for AsciiStr and AsciiString. |
| 169 | |
| 170 | Version 0.5.1 (2015-06-13) |
| 171 | ========================== |
| 172 | * Add `Ascii::from()`. |
| 173 | * Implement `Index` for `AsciiStr` and `AsciiString`. |
| 174 | * Implement `Default`,`FromIterator`,`Extend` and `Add` for `AsciiString` |
| 175 | * Added inherent methods on `AsciiString`: |
| 176 | * `with_capacity` |
| 177 | * `push_str` |
| 178 | * `capacity` |
| 179 | * `reserve` |
| 180 | * `reserve_exact` |
| 181 | * `shrink_to_fit` |
| 182 | * `push` |
| 183 | * `truncate` |
| 184 | * `pop` |
| 185 | * `remove` |
| 186 | * `insert` |
| 187 | * `len` |
| 188 | * `is_empty` |
| 189 | * `clear` |
| 190 | |
| 191 | Version 0.5.0 (2015-05-05) |
| 192 | ========================== |
| 193 | First release compatible with Rust 1.0.0. |