mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-04 08:34:12 +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:
1 parent
c85682de8d
commit
c6d587f0c7
2 files changed
+26
-8
No files matched your search
@@ -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