rust/library/std/src
Dylan DPC c4dd0d3bb7
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
2022-04-28 02:40:33 +02:00
..
backtrace Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
collections Rollup merge of #94826 - allgoewer:fix-retain-documentation, r=yaahc 2022-03-11 03:32:06 +01:00
env std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
error Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
f32 Implement IEEE 754-2019 minimun and maximum functions for f32/f64 2021-11-20 10:14:03 +01:00
f64 Remove fNN::lerp - consensus unlikely 2021-10-25 22:44:41 -05:00
ffi library: Use type aliases to make CStr(ing) in libcore/liballoc unstable 2022-04-14 21:53:11 +03:00
fs Use gender neutral terms 2022-04-07 08:51:59 +01:00
io Rollup merge of #95185 - m-ou-se:stabilize-stdin-lines, r=Mark-Simulacrum 2022-04-07 01:59:21 +02:00
lazy Upgrade wasm32 image to Ubuntu 20.04 2021-02-06 13:05:56 +01:00
net Improve AddrParseError description 2022-04-19 13:02:20 +10:00
num rustc_expand: Mark inner #![test] attributes as soft-unstable 2020-11-20 19:35:03 +03:00
os Auto merge of #96195 - sunfishcode:sunfishcode/handle-or-error-type, r=joshtriplett 2022-04-27 03:42:59 +00:00
panic review: fix nits and move panic safety tests to the correct place 2020-09-25 23:10:24 +02:00
path Improve Windows path prefix parsing 2022-04-17 01:23:46 -04:00
prelude Rollup merge of #94461 - jhpratt:2024-edition, r=pnkfelix 2022-04-15 20:50:43 +02:00
process Add test for issue #95178 2022-03-23 05:33:44 +00:00
sync Remove ptr-int transmute in std::sync::mpsc 2022-04-08 23:28:31 -04:00
sys Remove references to git.io 2022-04-25 17:05:58 -07:00
sys_common Make EncodeWide implement FusedIterator 2022-04-25 18:38:47 +02:00
thread Revert "Auto merge of #94373 - erikdesjardins:getitinl, r=Mark-Simulacrum" 2022-04-17 02:15:45 -04:00
time Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
alloc.rs trivial cfg(bootstrap) changes 2022-04-05 23:18:40 +02:00
ascii.rs Convert many files to intra-doc links 2020-09-02 17:37:40 -04:00
backtrace.rs revert changes that cast functions to raw pointers, portability hazard 2022-03-29 20:18:27 -04:00
env.rs Link to std::io's platform-specific behavior disclaimer 2022-03-27 21:01:28 -07:00
error.rs library: Move CStr to libcore, and CString to liballoc 2022-04-14 21:53:11 +03:00
f32.rs trivial cfg(bootstrap) changes 2022-04-05 23:18:40 +02:00
f64.rs trivial cfg(bootstrap) changes 2022-04-05 23:18:40 +02:00
fs.rs Document that DirEntry holds the directory open 2022-04-11 19:00:29 -07:00
keyword_docs.rs Rollup merge of #93692 - mfrw:mfrw/document-keyword-in, r=dtolnay 2022-03-19 02:02:02 +01:00
lazy.rs Add #[must_use] to core and std constructors 2021-10-10 02:44:26 -04:00
lib.rs Improve Windows path prefix parsing 2022-04-17 01:23:46 -04:00
macros.rs Format core and std macro rules, removing needless surrounding blocks 2022-03-11 15:26:51 -08:00
num.rs Add Saturating type (based on Wrapping type) 2021-08-10 19:27:01 +02:00
panic.rs Configure panic hook backtrace behavior 2022-02-02 13:46:42 -05:00
panicking.rs Rename RWLock to RwLock in std::sys. 2022-04-06 16:33:53 +02:00
path.rs Remove unnecessary function 2022-04-17 01:23:47 -04:00
primitive_docs.rs Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
process.rs fix since field version for termination stabilization 2022-03-29 17:10:49 -07:00
rt.rs Change Termination::report return type to ExitCode 2022-01-28 12:53:36 -08:00
time.rs Link to std::io's platform-specific behavior disclaimer 2022-03-27 21:01:28 -07:00