mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Refact, use std::io::Error::from_raw_os_error() to format message
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -1738,11 +1738,11 @@ pub fn create_process_with_logon(user: &str, pwd: &str, exe: &str, arg: &str) ->
|
||||
{
|
||||
let last_error = GetLastError();
|
||||
bail!(
|
||||
"CreateProcessWithLogonW failed : \"{}\", errno={}",
|
||||
"CreateProcessWithLogonW failed : \"{}\", error {:?}",
|
||||
last_error_table
|
||||
.get(&last_error)
|
||||
.unwrap_or(&"Unknown error"),
|
||||
last_error
|
||||
io::Error::from_raw_os_error(last_error as _)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user