style(clippy): auto-fix code style issues and unnecessary map_or allocations detected by cargo clippy

This commit is contained in:
Riz Ashraf committed 2026-09-27 22:38:08 +01:00
1 parent febd48c65d
commit 706e9ad172
9 files changed
+131 -74

No files matched your search

+11 -11
View File
@@ -50,17 +50,17 @@ pub async fn nvim_telemetry_handler(
let _ = tx.try_send(msg_str.clone());
}
if payload.event == "BufWritePost" {
if let Some(ref file_path) = payload.file {
let normalized_file = file_path.replace("\\", "/");
let topic = format!("nvim:save:{}", normalized_file);
let event = crate::state::GenericEvent {
topic,
session_id: Some(payload.session_id.clone()),
payload: serde_json::json!(&payload),
};
let _ = state.handler.state.event_bus_tx.send(event);
}
if payload.event == "BufWritePost"
&& let Some(ref file_path) = payload.file
{
let normalized_file = file_path.replace("\\", "/");
let topic = format!("nvim:save:{}", normalized_file);
let event = crate::state::GenericEvent {
topic,
session_id: Some(payload.session_id.clone()),
payload: serde_json::json!(&payload),
};
let _ = state.handler.state.event_bus_tx.send(event);
}
axum::Json(serde_json::json!({"status": "ok"}))