chore: cargo clippy

This commit is contained in:
amizing25
2025-06-30 15:10:50 +07:00
parent 8d8686692e
commit bd40dc058f
7 changed files with 9398 additions and 505 deletions
+4 -8
View File
@@ -129,10 +129,9 @@ impl Gateway {
if events
.iter()
.any(|p| p.path.file_name() == path.file_name())
{
if let Ok(metadata) = std::fs::metadata(path) {
if let Ok(modified) = metadata.modified() {
if modified > last_modified {
&& let Ok(metadata) = std::fs::metadata(path)
&& let Ok(modified) = metadata.modified()
&& modified > last_modified {
last_modified = modified;
let mut session = session.write().await;
@@ -142,11 +141,8 @@ impl Gateway {
tracing::info!("json updated");
}
}
}
}
}
}
Err(e) => eprintln!("json watcher error: {:?}", e),
Err(e) => eprintln!("json watcher error: {e:?}"),
}
}
_ = shutdown_rx.changed() => {
+2 -2
View File
@@ -118,7 +118,7 @@ pub async fn on_send_msg_cs_req(
session
.send(RevcMsgScNotify {
msg_type: body.msg_type,
text: format!("Success change mc to {:#?}", mc),
text: format!("Success change mc to {mc:#?}"),
emote: body.emote,
from_uid: SERVER_UID,
to_uid: 25,
@@ -156,7 +156,7 @@ pub async fn on_send_msg_cs_req(
session
.send(RevcMsgScNotify {
msg_type: body.msg_type,
text: format!("Success change march to {:#?}", march_type),
text: format!("Success change march to {march_type:#?}"),
emote: body.emote,
from_uid: SERVER_UID,
to_uid: 25,
+1 -1
View File
@@ -118,7 +118,7 @@ pub async fn on_get_scene_map_info_cs_req(
map_info
.chest_unlock_progress_list
.push(ChestUnlockProgress {
chest_type: 0,
r#type: 0,
total_chest_count: 25,
unlocked_chest_count: 25,
});