We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f8e817c + 2bfd0cb commit 2742093Copy full SHA for 2742093
stacks-common/src/deps_common/ctrlc/tests.rs
@@ -130,12 +130,16 @@ mod platform {
130
}
131
132
unsafe fn get_stdout() -> io::Result<HANDLE> {
133
+ use std::ffi::CString;
134
+
135
use winapi::um::fileapi::{CreateFileA, OPEN_EXISTING};
136
use winapi::um::handleapi::INVALID_HANDLE_VALUE;
137
use winapi::um::winnt::{FILE_SHARE_WRITE, GENERIC_READ, GENERIC_WRITE};
138
139
+ let conout = CString::new("CONOUT$").expect("CString::new failed");
140
141
let stdout = CreateFileA(
- "CONOUT$\0".as_ptr() as *const CHAR,
142
+ conout.as_ptr() as *const CHAR,
143
GENERIC_READ | GENERIC_WRITE,
144
FILE_SHARE_WRITE,
145
ptr::null_mut(),
0 commit comments