mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-05 09:11:28 +03:00
fix: cli compilation error when using cli feature
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use crate::client::*;
|
||||
use crate::common::{make_fd_to_json};
|
||||
use flutter_rust_bridge::{StreamSink, ZeroCopyBuffer};
|
||||
use hbb_common::{
|
||||
allow_err,
|
||||
@@ -1144,25 +1145,6 @@ impl Connection {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn make_fd_to_json(fd: FileDirectory) -> String {
|
||||
use serde_json::json;
|
||||
let mut fd_json = serde_json::Map::new();
|
||||
fd_json.insert("id".into(), json!(fd.id));
|
||||
fd_json.insert("path".into(), json!(fd.path));
|
||||
|
||||
let mut entries = vec![];
|
||||
for entry in fd.entries {
|
||||
let mut entry_map = serde_json::Map::new();
|
||||
entry_map.insert("entry_type".into(), json!(entry.entry_type.value()));
|
||||
entry_map.insert("name".into(), json!(entry.name));
|
||||
entry_map.insert("size".into(), json!(entry.size));
|
||||
entry_map.insert("modified_time".into(), json!(entry.modified_time));
|
||||
entries.push(entry_map);
|
||||
}
|
||||
fd_json.insert("entries".into(), json!(entries));
|
||||
serde_json::to_string(&fd_json).unwrap_or("".into())
|
||||
}
|
||||
|
||||
// Server Side
|
||||
// TODO connection_manager need use struct and trait,impl default method
|
||||
#[cfg(target_os = "android")]
|
||||
|
||||
Reference in New Issue
Block a user