opt: clean code
This commit is contained in:
parent
3bf3b7950f
commit
42f2ebc8e6
@ -581,7 +581,7 @@ impl TransferJob {
|
|||||||
self.set_file_confirmed(true);
|
self.set_file_confirmed(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Some(file_transfer_send_confirm_request::Union::offset_blk(offset)) => {
|
Some(file_transfer_send_confirm_request::Union::offset_blk(_offset)) => {
|
||||||
self.set_file_confirmed(true);
|
self.set_file_confirmed(true);
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
|
@ -7,8 +7,6 @@ use crate::common::update_clipboard;
|
|||||||
use crate::{common::MOBILE_INFO2, mobile::connection_manager::start_channel};
|
use crate::{common::MOBILE_INFO2, mobile::connection_manager::start_channel};
|
||||||
use crate::{ipc, VERSION};
|
use crate::{ipc, VERSION};
|
||||||
use hbb_common::fs::can_enable_overwrite_detection;
|
use hbb_common::fs::can_enable_overwrite_detection;
|
||||||
use hbb_common::log::debug;
|
|
||||||
use hbb_common::message_proto::file_transfer_send_confirm_request::Union;
|
|
||||||
use hbb_common::{
|
use hbb_common::{
|
||||||
config::Config,
|
config::Config,
|
||||||
fs,
|
fs,
|
||||||
@ -23,7 +21,6 @@ use hbb_common::{
|
|||||||
},
|
},
|
||||||
tokio_util::codec::{BytesCodec, Framed},
|
tokio_util::codec::{BytesCodec, Framed},
|
||||||
};
|
};
|
||||||
use libc::{printf, send};
|
|
||||||
#[cfg(any(target_os = "android", target_os = "ios"))]
|
#[cfg(any(target_os = "android", target_os = "ios"))]
|
||||||
use scrap::android::call_input_service_mouse_input;
|
use scrap::android::call_input_service_mouse_input;
|
||||||
use serde_json::{json, value::Value};
|
use serde_json::{json, value::Value};
|
||||||
|
10
src/ui/cm.rs
10
src/ui/cm.rs
@ -8,15 +8,13 @@ use hbb_common::fs::{
|
|||||||
can_enable_overwrite_detection, get_string, is_write_need_confirmation, new_send_confirm,
|
can_enable_overwrite_detection, get_string, is_write_need_confirmation, new_send_confirm,
|
||||||
DigestCheckResult,
|
DigestCheckResult,
|
||||||
};
|
};
|
||||||
use hbb_common::log::log;
|
|
||||||
use hbb_common::{
|
use hbb_common::{
|
||||||
allow_err,
|
allow_err,
|
||||||
config::Config,
|
config::Config,
|
||||||
fs, get_version_number, log,
|
fs, get_version_number, log,
|
||||||
message_proto::*,
|
message_proto::*,
|
||||||
protobuf::Message as _,
|
protobuf::Message as _,
|
||||||
tokio::{self, sync::mpsc, task::spawn_blocking},
|
tokio::{self, sync::mpsc, task::spawn_blocking}
|
||||||
ResultType,
|
|
||||||
};
|
};
|
||||||
use sciter::{make_args, Element, Value, HELEMENT};
|
use sciter::{make_args, Element, Value, HELEMENT};
|
||||||
use std::{
|
use std::{
|
||||||
@ -278,9 +276,9 @@ impl ConnectionManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ipc::FS::WriteOffset {
|
ipc::FS::WriteOffset {
|
||||||
id,
|
id: _,
|
||||||
file_num,
|
file_num: _,
|
||||||
offset_blk,
|
offset_blk: _,
|
||||||
} => {}
|
} => {}
|
||||||
},
|
},
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
|
@ -21,14 +21,13 @@ use clipboard::{
|
|||||||
};
|
};
|
||||||
use enigo::{self, Enigo, KeyboardControllable};
|
use enigo::{self, Enigo, KeyboardControllable};
|
||||||
use hbb_common::fs::{
|
use hbb_common::fs::{
|
||||||
can_enable_overwrite_detection, get_string, is_file_exists, new_send_confirm,
|
can_enable_overwrite_detection, get_string, new_send_confirm,
|
||||||
DigestCheckResult, RemoveJobMeta, get_job,
|
DigestCheckResult, RemoveJobMeta, get_job,
|
||||||
};
|
};
|
||||||
use hbb_common::log::log;
|
|
||||||
use hbb_common::{
|
use hbb_common::{
|
||||||
allow_err,
|
allow_err,
|
||||||
config::{self, Config, LocalConfig, PeerConfig},
|
config::{Config, LocalConfig, PeerConfig},
|
||||||
fs, get_version_number, log,
|
fs, log,
|
||||||
message_proto::{permission_info::Permission, *},
|
message_proto::{permission_info::Permission, *},
|
||||||
protobuf::Message as _,
|
protobuf::Message as _,
|
||||||
rendezvous_proto::ConnType,
|
rendezvous_proto::ConnType,
|
||||||
@ -46,8 +45,7 @@ use hbb_common::{config::TransferSerde, fs::TransferJobMeta};
|
|||||||
use crate::clipboard_file::*;
|
use crate::clipboard_file::*;
|
||||||
use crate::{
|
use crate::{
|
||||||
client::*,
|
client::*,
|
||||||
common::{self, check_clipboard, update_clipboard, ClipboardContext, CLIPBOARD_INTERVAL},
|
common::{self, check_clipboard, update_clipboard, ClipboardContext, CLIPBOARD_INTERVAL}
|
||||||
VERSION,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
type Video = AssetPtr<video_destination>;
|
type Video = AssetPtr<video_destination>;
|
||||||
@ -1345,7 +1343,7 @@ impl RemoveJob {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn gen_meta(&self) -> RemoveJobMeta {
|
pub fn _gen_meta(&self) -> RemoveJobMeta {
|
||||||
RemoveJobMeta {
|
RemoveJobMeta {
|
||||||
path: self.path.clone(),
|
path: self.path.clone(),
|
||||||
is_remote: self.is_remote,
|
is_remote: self.is_remote,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user