From 5812bebf87c536e4106c68802ee1571bbb49fa18 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Fri, 2 Mar 2012 18:53:06 -0800 Subject: [PATCH] Sadly, vec::init_elt_mut vanished since last (rushed) rebase. --- src/libcore/os.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/os.rs b/src/libcore/os.rs index a458fe49a309..b8dd6211d7a3 100644 --- a/src/libcore/os.rs +++ b/src/libcore/os.rs @@ -144,7 +144,7 @@ fn dll_filename(base: str) -> str { fn self_exe_path() -> option unsafe { let bufsize = 1023u; - let buf = vec::init_elt_mut(bufsize, 0u8 as c_char); + let buf = vec::to_mut(vec::init_elt(bufsize, 0u8 as c_char)); // FIXME: This does not handle the case where the buffer is too small ret vec::as_mut_buf(buf) {|pbuf| if load_self(pbuf as *mutable c_char, bufsize as c_uint) {