mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
perf: change patch_config parameter from Mapping to &Mapping for efficiency
This commit is contained in:
@@ -29,7 +29,7 @@ pub async fn get_clash_info() -> CmdResult<ClashInfo> {
|
||||
/// 修改Clash配置
|
||||
#[tauri::command]
|
||||
pub async fn patch_clash_config(payload: Mapping) -> CmdResult {
|
||||
feat::patch_clash(payload).await.stringify_err()
|
||||
feat::patch_clash(&payload).await.stringify_err()
|
||||
}
|
||||
|
||||
/// 修改Clash模式
|
||||
@@ -171,7 +171,7 @@ pub async fn apply_dns_config(apply: bool) -> CmdResult {
|
||||
|
||||
// 应用DNS配置到运行时配置
|
||||
Config::runtime().await.edit_draft(|d| {
|
||||
d.patch_config(patch);
|
||||
d.patch_config(&patch);
|
||||
});
|
||||
|
||||
// 重新生成配置
|
||||
|
||||
Reference in New Issue
Block a user