mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
Introduced `write_sidecar_log` to prevent temporary `format_args!` values from dropping early. - src-tauri/src/core/core.rs:60 — adds `write_sidecar_log`, which temporarily leaks the message into a `Box<str>`, builds the `Record`, writes it, then immediately reclaims the boxed string. The `unsafe` block is limited to `Box::from_raw` needed to undo `Box::leak`. - src-tauri/src/core/core.rs:794, 802, 806 — all three sidecar events now route through this helper, reusing the returned string for the in-memory log and avoiding extra UTF-8 decoding.