Skip to content

Commit b50d58a

Browse files
committed
---
yaml --- r: 150939 b: refs/heads/try2 c: fc2815a h: refs/heads/master i: 150937: 217b628 150935: ee599e5 v: v3
1 parent 76553cf commit b50d58a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: ff04aa8e385f343f66c5bed6a34d1ebf6c971e4d
8+
refs/heads/try2: fc2815a5cc703523c9a9aa2f2982e667e58a0402
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libstd/os.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,6 @@ pub fn self_exe_name() -> Option<Path> {
419419
unsafe {
420420
use libc::funcs::bsd44::*;
421421
use libc::consts::os::extra::*;
422-
use slice;
423422
let mib = ~[CTL_KERN as c_int,
424423
KERN_PROC as c_int,
425424
KERN_PROC_PATHNAME as c_int, -1 as c_int];
@@ -429,14 +428,14 @@ pub fn self_exe_name() -> Option<Path> {
429428
0u as libc::size_t);
430429
if err != 0 { return None; }
431430
if sz == 0 { return None; }
432-
let mut v: ~[u8] = slice::with_capacity(sz as uint);
431+
let mut v: Vec<u8> = Vec::with_capacity(sz as uint);
433432
let err = sysctl(mib.as_ptr(), mib.len() as ::libc::c_uint,
434433
v.as_mut_ptr() as *mut c_void, &mut sz, ptr::null(),
435434
0u as libc::size_t);
436435
if err != 0 { return None; }
437436
if sz == 0 { return None; }
438437
v.set_len(sz as uint - 1); // chop off trailing NUL
439-
Some(v)
438+
Some(v.move_iter().collect())
440439
}
441440
}
442441

0 commit comments

Comments
 (0)