rust/src/libstd
bors 422ebd5328 Auto merge of #33312 - Byron:double-ended-iterator-for-args, r=alexcrichton
DoubleEndedIterator for Args

This PR implements the DoubleEndedIterator trait for the `std::env::Args[Os]` structure, as well
as the internal implementations.

It is primarily motivated by me, as I happened to implement a simple `reversor` program many times
now, which so far had to use code like this:

```Rust
for arg in std::env::args().skip(1).collect::<Vec<_>>().iter().rev() {}
```

... even though I would have loved to do this instead:

```Rust
for arg in std::env::args().skip(1).rev() {}
```

The latter is more natural, and I did not find a reason for not implementing it.
After all, on every system, the number of arguments passed to the program are known
at runtime.

To my mind, it follows KISS, and does not try to be smart at all. Also, there are no unit-tests,
primarily as I did not find any existing tests for the `Args` struct either.

The windows implementation is basically a copy-pasted variant of the `next()` method implementation,
and I could imagine sharing most of the code instead. Actually I would be happy if the reviewer would
ask for it.
2016-07-27 02:26:37 -07:00
..
collections Rollup merge of #35001 - rdwilliamson:patch-1, r=alexcrichton 2016-07-26 17:21:13 -04:00
ffi Document CStr::as_ptr dangers. 2016-06-19 15:14:51 +03:00
io Auto merge of #33974 - habnabit:eintr-retry-for-read-iterators, r=alexcrichton 2016-07-19 01:20:50 -07:00
net Auto merge of #34694 - mathphreak:master, r=alexcrichton 2016-07-20 07:10:09 -07:00
num std: Stabilize APIs for the 1.11.0 release 2016-07-03 10:49:01 -07:00
os std: Fix up stabilization discrepancies 2016-06-23 14:08:11 -07:00
prelude End stdlib module summaries with a full stop. 2016-03-04 17:37:11 -05:00
rand std: restructure rand os code into sys modules 2016-02-17 16:21:32 -08:00
sync Auto merge of #34724 - mitchmindtree:mpsc_receiver_try_recv, r=alexcrichton 2016-07-21 22:39:48 -07:00
sys Auto merge of #33312 - Byron:double-ended-iterator-for-args, r=alexcrichton 2016-07-27 02:26:37 -07:00
thread Rollup merge of #34406 - frewsxcv:sleep-ex, r=alexcrichton 2016-06-28 16:05:14 +02:00
time std: Clean out old unstable + deprecated APIs 2016-05-30 20:46:32 -07:00
ascii.rs std: Stabilize APIs for the 1.9 release 2016-04-11 08:57:53 -07:00
build.rs Fix issue where rustbuild expected msvc to have ar 2016-06-16 08:38:06 -04:00
Cargo.toml rustbuild: Add support for crate tests + doctests 2016-05-12 08:52:20 -07:00
env.rs Auto merge of #33312 - Byron:double-ended-iterator-for-args, r=alexcrichton 2016-07-27 02:26:37 -07:00
error.rs Add examples for std::Error module 2016-07-10 22:29:19 +02:00
fs.rs Rollup merge of #35010 - GuillaumeGomez:file_doc, r=steveklabnik 2016-07-26 17:21:13 -04:00
lib.rs rustc: Update stage0 to beta-2016-07-06 2016-07-06 09:29:15 -07:00
macros.rs doc: Mention that writeln! and println! always use LF 2016-07-12 14:39:16 +09:00
memchr.rs Fix a few typos in the code 2016-07-03 10:02:24 +02:00
panic.rs Set unwind_safe_lock_refs stability to 1.12.0. 2016-07-11 07:34:20 -07:00
panicking.rs Revert "Refactored code to access TLS only in case of panic" 2016-07-16 22:19:43 +02:00
path.rs Fix std::path::Path::file_name() doc 2016-07-06 01:26:24 +02:00
primitive_docs.rs Improve primitive integers documentation 2016-07-08 23:03:17 +02:00
process.rs Add doc example for std::process::ExitStatus::success. 2016-07-12 21:32:55 -04:00
rt.rs Auto merge of #33803 - WiSaGaN:feature/rename-main-thread, r=alexcrichton 2016-06-03 19:36:32 -07:00
rtdeps.rs bootstrap: Add directives to not double-link libs 2016-02-11 11:12:32 -08:00