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:
@@ -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<_>>()
|
||||
|
||||
Reference in New Issue
Block a user