From 1b4512bbe12dda8b7fe9c0650f3dd6fbb75076e2 Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Thu, 8 Oct 2026 02:14:41 +0800 Subject: [PATCH] refactor(dns): remove ignored runtime patch --- src-tauri/src/cmd/clash.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src-tauri/src/cmd/clash.rs b/src-tauri/src/cmd/clash.rs index 47611d847..6fb9602ad 100644 --- a/src-tauri/src/cmd/clash.rs +++ b/src-tauri/src/cmd/clash.rs @@ -179,7 +179,7 @@ pub async fn apply_dns_config(apply: bool) -> CmdResult { ); })?; - let patch_config = serde_yaml_ng::from_str::(&dns_yaml).stringify_err_log(|e| { + serde_yaml_ng::from_str::(&dns_yaml).stringify_err_log(|e| { logging!( error, Type::Config, @@ -188,13 +188,6 @@ pub async fn apply_dns_config(apply: bool) -> CmdResult { ); })?; - let mut patch = serde_yaml_ng::Mapping::new(); - patch.insert("dns".into(), patch_config.into()); - - Config::runtime().await.edit_draft(|d| { - d.patch_config(&patch); - }); - CoreManager::global().update_config_checked().await.map_err(|error| { logging!(error, Type::Config, "failed to apply the config with DNS: {error:#}"); proxy_aware_error(&error)