refactor: fix formating in rust

This commit is contained in:
vffuunnyy
2025-08-16 15:22:38 +07:00
parent 902256d461
commit 9c33f007a1
14 changed files with 654 additions and 147 deletions

View File

@@ -78,7 +78,12 @@ pub fn quit() {
// 使用异步任务处理资源清理,避免阻塞
AsyncHandler::spawn(move || async move {
logging!(info, Type::System, true, "Start asynchronous resource cleanup");
logging!(
info,
Type::System,
true,
"Start asynchronous resource cleanup"
);
let cleanup_result = clean_async().await;
logging!(
@@ -95,7 +100,12 @@ pub fn quit() {
async fn clean_async() -> bool {
use tokio::time::{timeout, Duration};
logging!(info, Type::System, true, "Start executing asynchronous cleanup...");
logging!(
info,
Type::System,
true,
"Start executing asynchronous cleanup..."
);
// 1. 处理TUN模式
let tun_task = async {
@@ -220,7 +230,13 @@ pub fn clean() -> bool {
match rx.recv_timeout(std::time::Duration::from_secs(8)) {
Ok(result) => {
logging!(info, Type::System, true, "Cleanup completed, result: {}", result);
logging!(
info,
Type::System,
true,
"Cleanup completed, result: {}",
result
);
result
}
Err(_) => {