mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
- Changed providers_proxies from Value to Box<Value> in CmdProxyState - Reduces struct size from 32 bytes to 8 bytes, optimizing memory usage
20 lines
478 B
Rust
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),
|
|
}
|
|
}
|
|
}
|