remove some compilation warnings

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2022-10-31 10:18:22 +08:00
parent d6c9639c5d
commit a362446eff
2 changed files with 4 additions and 2 deletions

View File

@ -418,6 +418,7 @@ pub fn session_start_(id: &str, event_stream: StreamSink<EventToUI>) -> ResultTy
pub mod connection_manager { pub mod connection_manager {
use std::collections::HashMap; use std::collections::HashMap;
#[cfg(any(target_os = "android"))]
use hbb_common::log; use hbb_common::log;
#[cfg(any(target_os = "android"))] #[cfg(any(target_os = "android"))]
use scrap::android::call_main_service_set_by_name; use scrap::android::call_main_service_set_by_name;

View File

@ -7,13 +7,14 @@ use std::{
use flutter_rust_bridge::{StreamSink, SyncReturn, ZeroCopyBuffer}; use flutter_rust_bridge::{StreamSink, SyncReturn, ZeroCopyBuffer};
use serde_json::json; use serde_json::json;
use hbb_common::ResultType;
use hbb_common::{ use hbb_common::{
config::{self, LocalConfig, PeerConfig, ONLINE}, config::{self, LocalConfig, PeerConfig, ONLINE},
fs, log, fs, log,
}; };
use hbb_common::{message_proto::Hash, ResultType};
use crate::flutter::{self, SESSIONS}; use crate::flutter::{self, SESSIONS};
#[cfg(target_os = "android")]
use crate::start_server; use crate::start_server;
use crate::ui_interface::{self, *}; use crate::ui_interface::{self, *};
use crate::{ use crate::{
@ -362,7 +363,7 @@ pub fn session_create_dir(id: String, act_id: i32, path: String, is_remote: bool
} }
} }
pub fn session_read_local_dir_sync(id: String, path: String, show_hidden: bool) -> String { pub fn session_read_local_dir_sync(_id: String, path: String, show_hidden: bool) -> String {
if let Ok(fd) = fs::read_dir(&fs::get_path(&path), show_hidden) { if let Ok(fd) = fs::read_dir(&fs::get_path(&path), show_hidden) {
return make_fd_to_json(fd.id, path, &fd.entries); return make_fd_to_json(fd.id, path, &fd.entries);
} }