We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a5ee37 commit 03cc757Copy full SHA for 03cc757
src/libstd/os.rs
@@ -642,7 +642,8 @@ pub fn make_dir(p: &Path, mode: c_int) -> bool {
642
use os::win32::as_utf16_p;
643
// FIXME: turn mode into something useful? #2623
644
do as_utf16_p(p.to_str()) |buf| {
645
- libc::CreateDirectoryW(buf, ptr::null()) != (0 as libc::BOOL)
+ libc::CreateDirectoryW(buf, ptr::null() as LPCWSTR)
646
+ != (0 as libc::BOOL)
647
}
648
649
@@ -1081,7 +1082,7 @@ pub fn last_os_error() -> ~str {
1081
1082
1083
let mut buf = [0 as c_char, ..TMPBUF_SZ];
1084
- do buf.as_imm_buf |buf, len| {
1085
+ do buf.as_mut_buf |buf, len| {
1086
unsafe {
1087
let res = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM |
1088
FORMAT_MESSAGE_IGNORE_INSERTS,
0 commit comments