We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ad18eb commit e68a134Copy full SHA for e68a134
src/libstd/sys/windows/os.rs
@@ -291,14 +291,14 @@ unsafe fn os_string_from_ptr(ptr: *mut u16) -> OsString {
291
impl Iterator for Args {
292
type Item = OsString;
293
fn next(&mut self) -> Option<OsString> {
294
- self.range.next().map(|i| os_string_from_ptr(self.cur.offset(i)))
+ self.range.next().map(|i| os_string_from_ptr(unsafe { *self.cur.offset(i) }))
295
}
296
fn size_hint(&self) -> (usize, Option<usize>) { self.range.size_hint() }
297
298
299
impl DoubleEndedIterator for Args {
300
fn next_back(&mut self) -> Option<OsString> {
301
- self.range.next_back().map(|i| os_string_from_ptr(self.cur.offset(i)))
+ self.range.next_back().map(|i| os_string_from_ptr(unsafe { *self.cur.offset(i) }))
302
303
304
0 commit comments