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:
@@ -99,7 +99,7 @@ async fn clean_async() -> bool {
|
||||
|
||||
// 1. 处理TUN模式
|
||||
let tun_task = async {
|
||||
if Config::verge().data().enable_tun_mode.unwrap_or(false) {
|
||||
if Config::verge().data_mut().enable_tun_mode.unwrap_or(false) {
|
||||
let disable_tun = serde_json::json!({
|
||||
"tun": {
|
||||
"enable": false
|
||||
@@ -240,7 +240,7 @@ pub fn hide() {
|
||||
use crate::module::lightweight::add_light_weight_timer;
|
||||
|
||||
let enable_auto_light_weight_mode = Config::verge()
|
||||
.data()
|
||||
.data_mut()
|
||||
.enable_auto_light_weight_mode
|
||||
.unwrap_or(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user