diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-04-28 02:40:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-28 02:40:33 +0200 |
| commit | c4dd0d3bb70367273db9eee9e5fa6cb323a69547 (patch) | |
| tree | fd2369b872cc8b4d2f49e483596df56479a18497 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs | |
| parent | 4a7483c9054a89949a74876ce2f5cb5f3eae235f (diff) | |
| parent | fc6af819c4fc352a0b6487d82786c960e1d5deef (diff) | |
| download | rust-c4dd0d3bb70367273db9eee9e5fa6cb323a69547.tar.gz rust-c4dd0d3bb70367273db9eee9e5fa6cb323a69547.zip | |
Rollup merge of #96397 - AronParker:issue-96368-fix, r=dtolnay
Make EncodeWide implement FusedIterator [`EncodeUtf16`](https://doc.rust-lang.org/std/str/struct.EncodeUtf16.html) and [`EncodeWide`](https://doc.rust-lang.org/std/os/windows/ffi/struct.EncodeWide.html) currently serve similar purposes: They convert from UTF-8 to UTF-16 and WTF-8 to WTF-16, respectively. `EncodeUtf16` wraps a &str, whereas `EncodeWide` wraps an &OsStr. When Iteration has concluded, these iterators wrap an empty slice, which will forever yield `None` values. Hence, `EncodeUtf16` rightfully implements `FusedIterator`. However, `EncodeWide` in contrast does not, even though it serves an almost identical purpose. This PR attempts to fix that issue. I consider this change minor and non-controversial, hence why I have not added a RFC/FCP. Please let me know if the stability attribute is wrong or contains a wrong version number. Thanks in advance. Fixes https://github.com/rust-lang/rust/issues/96368
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions
