remove warns

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2023-11-14 21:01:31 +08:00
parent d2ff675fbc
commit 13bade262f
3 changed files with 11 additions and 9 deletions

View File

@ -14,8 +14,6 @@ use crossbeam_queue::ArrayQueue;
use hbb_common::sleep; use hbb_common::sleep;
#[cfg(not(target_os = "ios"))] #[cfg(not(target_os = "ios"))]
use hbb_common::tokio::sync::mpsc::error::TryRecvError; use hbb_common::tokio::sync::mpsc::error::TryRecvError;
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
use hbb_common::tokio::sync::Mutex as TokioMutex;
use hbb_common::{ use hbb_common::{
allow_err, allow_err,
config::{PeerConfig, TransferSerde}, config::{PeerConfig, TransferSerde},
@ -34,8 +32,10 @@ use hbb_common::{
sync::mpsc, sync::mpsc,
time::{self, Duration, Instant, Interval}, time::{self, Duration, Instant, Interval},
}, },
ResultType, Stream, Stream,
}; };
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
use hbb_common::{tokio::sync::Mutex as TokioMutex, ResultType};
use scrap::CodecFormat; use scrap::CodecFormat;
use crate::client::{ use crate::client::{

View File

@ -1,8 +1,11 @@
#[cfg(windows)]
use crate::ipc::{connect, Data};
#[cfg(all(windows, feature = "virtual_display_driver"))] #[cfg(all(windows, feature = "virtual_display_driver"))]
use crate::platform::is_installed; use crate::platform::is_installed;
use crate::{display_service, ipc::PrivacyModeState, ui_interface::get_option}; #[cfg(windows)]
use crate::{
display_service,
ipc::{connect, Data},
};
use crate::{ipc::PrivacyModeState, ui_interface::get_option};
#[cfg(windows)] #[cfg(windows)]
use hbb_common::tokio; use hbb_common::tokio;
use hbb_common::{anyhow::anyhow, bail, lazy_static, ResultType}; use hbb_common::{anyhow::anyhow, bail, lazy_static, ResultType};

View File

@ -19,8 +19,6 @@ use crate::ipc::{self, Data};
use clipboard::ContextSend; use clipboard::ContextSend;
#[cfg(not(any(target_os = "android", target_os = "ios")))] #[cfg(not(any(target_os = "android", target_os = "ios")))]
use hbb_common::tokio::sync::mpsc::unbounded_channel; use hbb_common::tokio::sync::mpsc::unbounded_channel;
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
use hbb_common::tokio::sync::Mutex as TokioMutex;
use hbb_common::{ use hbb_common::{
allow_err, allow_err,
config::Config, config::Config,
@ -34,8 +32,9 @@ use hbb_common::{
sync::mpsc::{self, UnboundedSender}, sync::mpsc::{self, UnboundedSender},
task::spawn_blocking, task::spawn_blocking,
}, },
ResultType,
}; };
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
use hbb_common::{tokio::sync::Mutex as TokioMutex, ResultType};
use serde_derive::Serialize; use serde_derive::Serialize;
#[derive(Serialize, Clone)] #[derive(Serialize, Clone)]