Skip to content

Commit 54ddb55

Browse files
committed
stdlib: Replace an unsafe cast with ptr::null
1 parent f96ad30 commit 54ddb55

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lib/run_program.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ type program = obj {
9292
fn arg_vec(prog: str, args: [@str]) -> [sbuf] {
9393
let argptrs = str::as_buf(prog, {|buf| [buf] });
9494
for arg in args { argptrs += str::as_buf(*arg, {|buf| [buf] }); }
95-
// FIXME: ptr::null instead of cast
96-
argptrs += [unsafe {unsafe::reinterpret_cast(0)}];
95+
argptrs += [ptr::null()];
9796
ret argptrs;
9897
}
9998

0 commit comments

Comments
 (0)