From a362446effd54be5804aadf29d7ce1acae57e386 Mon Sep 17 00:00:00 2001 From: fufesou Date: Mon, 31 Oct 2022 10:18:22 +0800 Subject: [PATCH] remove some compilation warnings Signed-off-by: fufesou --- src/flutter.rs | 1 + src/flutter_ffi.rs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/flutter.rs b/src/flutter.rs index 5e844f910..5b8504b4d 100644 --- a/src/flutter.rs +++ b/src/flutter.rs @@ -418,6 +418,7 @@ pub fn session_start_(id: &str, event_stream: StreamSink) -> ResultTy pub mod connection_manager { use std::collections::HashMap; + #[cfg(any(target_os = "android"))] use hbb_common::log; #[cfg(any(target_os = "android"))] use scrap::android::call_main_service_set_by_name; diff --git a/src/flutter_ffi.rs b/src/flutter_ffi.rs index cddaf4d79..45bcd12e3 100644 --- a/src/flutter_ffi.rs +++ b/src/flutter_ffi.rs @@ -7,13 +7,14 @@ use std::{ use flutter_rust_bridge::{StreamSink, SyncReturn, ZeroCopyBuffer}; use serde_json::json; +use hbb_common::ResultType; use hbb_common::{ config::{self, LocalConfig, PeerConfig, ONLINE}, fs, log, }; -use hbb_common::{message_proto::Hash, ResultType}; use crate::flutter::{self, SESSIONS}; +#[cfg(target_os = "android")] use crate::start_server; use crate::ui_interface::{self, *}; 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) { return make_fd_to_json(fd.id, path, &fd.entries); }