fix: 修复 Tauri 编译错误(SystemStatsResponse 定义)

问题:
- SystemStatsResponse 在 bin/proxy.rs 中定义
- 库模块 proxy.rs 和 validate.rs 试图从 super 导入,但路径错误

修复:
- 将 SystemStatsResponse 定义移到库模块 proxy.rs
- 在 validate.rs 中添加正确的导入
- 移除 bin/proxy.rs 中的重复定义(稍后处理)
This commit is contained in:
2026-10-08 00:13:41 +08:00
parent 53e23037ec
commit 2daa49ce31
2 changed files with 33 additions and 2 deletions

View File

@@ -5,6 +5,8 @@ use std::path::Path;
use std::process::Command;
use std::time::{SystemTime, UNIX_EPOCH};
use super::proxy::SystemStatsResponse;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum ValidationStatus {
Pass,
@@ -282,7 +284,7 @@ pub fn validate_thermal_state_via_pmset() -> Option<MetricValidation> {
// ==================== Main Validation Function ====================
pub fn run_validation(layers: &[u32], macmon_stats: &super::SystemStatsResponse) -> ValidationResult {
pub fn run_validation(layers: &[u32], macmon_stats: &SystemStatsResponse) -> ValidationResult {
write_log(&format!("[INFO] Validation started: layers={:?}", layers));
let mut result = ValidationResult {