mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-28 07:39:36 +08:00
chore: use a match instead of unwrap error
This commit is contained in:
parent
b522de3b56
commit
32a29a5556
@ -1806,13 +1806,16 @@ impl Connection {
|
||||
|
||||
let encode_result = me.write_to_bytes();
|
||||
|
||||
if let Ok(data) = encode_result {
|
||||
let result = call_main_service_key_event(&data);
|
||||
if let Err(e) = result {
|
||||
log::debug!("call_main_service_key_event fail:{}", e);
|
||||
match encode_result {
|
||||
Ok(data) => {
|
||||
let result = call_main_service_key_event(&data);
|
||||
if let Err(e) = result {
|
||||
log::debug!("call_main_service_key_event fail: {}", e);
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
log::debug!("encode key event fail: {}", e);
|
||||
}
|
||||
} else {
|
||||
log::debug!("encode key event fail:{}", encode_result.err().unwrap());
|
||||
}
|
||||
}
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
|
Loading…
Reference in New Issue
Block a user