]> git.lizzy.rs Git - rust.git/blobdiff - src/librustpkg/util.rs
auto merge of #8532 : kballard/rust/cstr-cleanup, r=erickt
[rust.git] / src / librustpkg / util.rs
index de80aafb44135ae43358dc2dca952bf67385f540..82f098b668dc45d1dbd424e6f56816c3496c4427 100644 (file)
@@ -398,8 +398,8 @@ pub fn link_exe(src: &Path, dest: &Path) -> bool {
     use std::libc;
 
     unsafe {
-        do src.to_c_str().with_ref |src_buf| {
-            do dest.to_c_str().with_ref |dest_buf| {
+        do src.with_c_str |src_buf| {
+            do dest.with_c_str |dest_buf| {
                 libc::link(src_buf, dest_buf) == 0 as libc::c_int &&
                     libc::chmod(dest_buf, 755) == 0 as libc::c_int
             }