Auto merge of #23347 - aturon:stab-misc, r=alexcrichton

This commit deprecates the `count`, `range` and `range_step` functions
in `iter`, in favor of range notation. To recover all existing
functionality, a new `step_by` adapter is provided directly on `ops::Range`
and `ops::RangeFrom`.

[breaking-change]

r? @alexcrichton
This commit is contained in:
bors
2015-03-16 17:02:11 +00:00
16 changed files with 136 additions and 95 deletions

View File

@@ -286,7 +286,7 @@ pub fn args() -> Args {
let vec = unsafe {
let (argc, argv) = (*_NSGetArgc() as isize,
*_NSGetArgv() as *const *const c_char);
range(0, argc as isize).map(|i| {
(0.. argc as isize).map(|i| {
let bytes = CStr::from_ptr(*argv.offset(i)).to_bytes().to_vec();
OsStringExt::from_vec(bytes)
}).collect::<Vec<_>>()