rust/library
Dylan DPC c5e612ce6b
Rollup merge of #85146 - ijackson:seek-rewind, r=m-ou-se
Provide io::Seek::rewind

Using `Seek::seek` is slightly clumsy because of the need to write (or import) `std::io::SeekFrom` to get at `SeekStart`.  C already has `rewind` (although with broken error handling); we should have it too.

I'm motivated to do this because I've just found myself copy-pasting my 5-line extension trait between projects.

That the example ends up using `OpenOptions` makes this look like a niche use case, but it is very common to rewind temporary files.  `tempfile` isn't available for use in this example or it would have looked shorter and more natural.

If this gets a positive reception I will open a tracking issue and update the feature gate.
2021-05-10 16:15:05 +02:00
..
alloc Rollup merge of #84328 - Folyd:stablize_map_into_keys_values, r=m-ou-se 2021-05-06 13:30:54 +02:00
backtrace@221483ebaf Update backtrace to 0.3.57 2021-04-25 13:48:03 -07:00
core Rollup merge of #85096 - clarfonthey:const_unchecked, r=oli-obk 2021-05-10 16:15:02 +02:00
panic_abort
panic_unwind Change 'NULL' to 'null' 2021-05-02 17:46:00 -06:00
proc_macro don't let const_fn feature flag affect impl-block-level trait bounds 2021-04-29 09:27:45 +02:00
profiler_builtins
rtstartup
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std io::Seek: Set tracking issue 2021-05-10 13:55:31 +01:00
stdarch@6c4f4e1990 Bump stdarch submodule 2021-05-08 19:40:27 +01:00
term
test move core::hint::black_box under its own feature gate 2021-04-25 11:08:12 +02:00
unwind