refactor(Draft): Replace latest() with latest_ref() and data() with data_mut() in multiple files for improved mutability handling and consistency across the codebase (#3987)

* feat: add benchmarking for draft operations and new draft management structure

* Refactor Config Access: Replace `latest()` with `latest_ref()` and `data()` with `data_mut()` in multiple files for improved mutability handling and consistency across the codebase.

* refactor: remove DraftNew implementation and related benchmarks for cleaner codebase
This commit is contained in:
Tunglies
2025-07-04 22:43:23 +08:00
committed by GitHub
parent 3f95c81243
commit 764ef48fd1
36 changed files with 573 additions and 267 deletions

View File

@@ -141,9 +141,9 @@ impl NetworkManager {
if client_guard.is_none() {
let port = Config::verge()
.latest()
.latest_ref()
.verge_mixed_port
.unwrap_or(Config::clash().data().get_mixed_port());
.unwrap_or(Config::clash().latest_ref().get_mixed_port());
let proxy_scheme = format!("http://127.0.0.1:{port}");
@@ -279,9 +279,9 @@ impl NetworkManager {
}
ProxyType::Localhost => {
let port = Config::verge()
.latest()
.latest_ref()
.verge_mixed_port
.unwrap_or(Config::clash().data().get_mixed_port());
.unwrap_or(Config::clash().latest_ref().get_mixed_port());
let proxy_scheme = format!("http://127.0.0.1:{port}");