Files
clash-verge-rev/src-tauri/src/state/proxy.rs
Tunglies 30015dfd67 refactor(state/proxy): use Box<Value> for providers_proxies to reduce struct size
- Changed providers_proxies from Value to Box<Value> in CmdProxyState
- Reduces struct size from 32 bytes to 8 bytes, optimizing memory usage
2025-06-06 12:46:58 +08:00

20 lines
478 B
Rust

use serde_json::Value;
pub struct CmdProxyState {
pub last_refresh_time: std::time::Instant,
pub need_refresh: bool,
pub proxies: Box<Value>,
pub providers_proxies: Box<Value>,
}
impl Default for CmdProxyState {
fn default() -> Self {
Self {
last_refresh_time: std::time::Instant::now(),
need_refresh: true,
proxies: Box::new(Value::Null),
providers_proxies: Box::new(Value::Null),
}
}
}