From e869da8d4c8b2e8c809a1a3facde41874b9a56a6 Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Fri, 19 Sep 2025 00:04:51 +0800 Subject: [PATCH] refactor: remove unused HTTP-specific structs to streamline service code --- src-tauri/src/core/service.rs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src-tauri/src/core/service.rs b/src-tauri/src/core/service.rs index 51344bed..3312f6c0 100644 --- a/src-tauri/src/core/service.rs +++ b/src-tauri/src/core/service.rs @@ -7,7 +7,6 @@ use crate::{ }; use anyhow::{Context, Result, bail}; use once_cell::sync::Lazy; -use serde::{Deserialize, Serialize}; use std::{env::current_exe, path::PathBuf, process::Command as StdCommand}; use tokio::sync::Mutex; @@ -24,23 +23,6 @@ pub enum ServiceStatus { Unavailable(String), } -// 保留核心数据结构,但将HTTP特定的结构体合并为通用结构体 -#[derive(Debug, Deserialize, Serialize, Clone)] -pub struct ResponseBody { - pub core_type: Option, - pub bin_path: String, - pub config_dir: String, - pub log_file: String, -} - -// 保留通用的响应结构体,用于IPC通信后的数据解析 -#[derive(Debug, Deserialize, Serialize, Clone)] -pub struct JsonResponse { - pub code: u64, - pub msg: String, - pub data: Option, -} - #[derive(Clone)] pub struct ServiceManager(ServiceStatus);