From b0ae3b3b5c8b005b3f7cb2b26b17ae521a38c669 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 22 Sep 2025 16:49:51 +0800 Subject: Modify the file structure --- crates/env/src/local/config.rs | 37 ------------------------------------- crates/env/src/local/manage.rs | 1 - 2 files changed, 38 deletions(-) delete mode 100644 crates/env/src/local/config.rs delete mode 100644 crates/env/src/local/manage.rs (limited to 'crates/env/src/local') diff --git a/crates/env/src/local/config.rs b/crates/env/src/local/config.rs deleted file mode 100644 index ddb7dd0..0000000 --- a/crates/env/src/local/config.rs +++ /dev/null @@ -1,37 +0,0 @@ -use cfg_file::ConfigFile; -use serde::{Deserialize, Serialize}; -use std::net::SocketAddr; - -use crate::constants::CLIENT_FILE_WORKSPACE; -use crate::constants::PORT; - -#[derive(Serialize, Deserialize, ConfigFile)] -#[cfg_file(path = CLIENT_FILE_WORKSPACE)] -pub struct LocalConfig { - /// The vault address, representing the upstream address of the local workspace, - /// to facilitate timely retrieval of new updates from the upstream source. - vault_addr: SocketAddr, -} - -impl Default for LocalConfig { - fn default() -> Self { - Self { - vault_addr: SocketAddr::V4(std::net::SocketAddrV4::new( - std::net::Ipv4Addr::new(127, 0, 0, 1), - PORT, - )), - } - } -} - -impl LocalConfig { - /// Set the vault address. - pub fn set_vault_addr(&mut self, addr: SocketAddr) { - self.vault_addr = addr; - } - - /// Get the vault address. - pub fn vault_addr(&self) -> SocketAddr { - self.vault_addr - } -} diff --git a/crates/env/src/local/manage.rs b/crates/env/src/local/manage.rs deleted file mode 100644 index 8b13789..0000000 --- a/crates/env/src/local/manage.rs +++ /dev/null @@ -1 +0,0 @@ - -- cgit