remove unused code blocks

This commit is contained in:
Timofey Gelazoniya 2021-04-17 04:28:25 +03:00
parent 8df14a210f
commit 92eb5fae39
1 changed files with 0 additions and 23 deletions

View File

@ -67,26 +67,3 @@ pub fn set_ctrl_c_handler() {
println!("> Exiting..."); println!("> Exiting...");
process::exit(0); process::exit(0);
} }
pub fn get_raw_command_line() -> String {
// use winapi::um::processenv::GetCommandLineW;
unsafe {
let line = GetCommandLineW();
let mut cursor = line;
let mut length = 0;
while *cursor != 0 {
length += 1;
cursor = cursor.add(1);
}
let array: &[u16] = std::slice::from_raw_parts(line, length);
String::from_utf16(array).expect("Invalid unicode")
}
}
#[link(name="kernel32")]
extern "system" {
fn GetCommandLineW() -> *const u16;
}