mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-10 12:31:29 +03:00
refact: suppress warns on macos (#12449)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#[cfg(not(target_os = "ios"))]
|
||||
use hbb_common::whoami;
|
||||
use hbb_common::{
|
||||
allow_err,
|
||||
anyhow::bail,
|
||||
@@ -10,7 +12,7 @@ use hbb_common::{
|
||||
self,
|
||||
sync::mpsc::{unbounded_channel, UnboundedReceiver, UnboundedSender},
|
||||
},
|
||||
whoami, ResultType,
|
||||
ResultType,
|
||||
};
|
||||
|
||||
use std::{
|
||||
@@ -45,7 +47,7 @@ pub(super) fn start_listening() -> ResultType<()> {
|
||||
}
|
||||
if let Some(self_addr) = get_ipaddr_by_peer(&addr) {
|
||||
let mut msg_out = Message::new();
|
||||
let mut hostname = whoami::hostname();
|
||||
let mut hostname = crate::whoami_hostname();
|
||||
// The default hostname is "localhost" which is a bit confusing
|
||||
if hostname == "localhost" {
|
||||
hostname = "unknown".to_owned();
|
||||
|
||||
Reference in New Issue
Block a user