diff options
| author | Kevin Cantu <me@kevincantu.org> | 2012-01-25 00:53:17 -0800 |
|---|---|---|
| committer | Kevin Cantu <me@kevincantu.org> | 2012-01-25 00:53:17 -0800 |
| commit | c7b23f9a86fcdf328ebb349d9a5ad4e4c7dfe6ce (patch) | |
| tree | 96ba7443233c718f89e2ebaa5a673882ca7c2c33 /src/libstd/linux_os.rs | |
| parent | 9750e83a17a8f9f865eae757dcdccf374b1c82b7 (diff) | |
| download | rust-c7b23f9a86fcdf328ebb349d9a5ad4e4c7dfe6ce.tar.gz rust-c7b23f9a86fcdf328ebb349d9a5ad4e4c7dfe6ce.zip | |
Replacing str::unsafe_from_bytes with str::from_bytes (part 1)
Diffstat (limited to 'src/libstd/linux_os.rs')
| -rw-r--r-- | src/libstd/linux_os.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/linux_os.rs b/src/libstd/linux_os.rs index 7bc0212c1c2..82b1197a51f 100644 --- a/src/libstd/linux_os.rs +++ b/src/libstd/linux_os.rs @@ -125,7 +125,8 @@ fn dylib_filename(base: str) -> str { ret "lib" + base + ".so"; } /// followed by a path separator fn get_exe_path() -> option::t<fs::path> { let bufsize = 1023u; - let path = str::unsafe_from_bytes(vec::init_elt(bufsize, 0u8)); + // FIXME: path "strings" will likely need fixing... + let path = str::from_bytes(vec::init_elt(bufsize, 0u8)); ret str::as_buf("/proc/self/exe", { |proc_self_buf| str::as_buf(path, { |path_buf| if libc::readlink(proc_self_buf, path_buf, bufsize) != -1 { |
