perf: change patch_config parameter from Mapping to &Mapping for efficiency

This commit is contained in:
Tunglies
2025-11-30 20:44:21 +08:00
parent ae8c302bf4
commit 6897ead070
5 changed files with 19 additions and 20 deletions

View File

@@ -22,7 +22,7 @@ impl IRuntime {
// 这里只更改 allow-lan | ipv6 | log-level | tun
#[inline]
pub fn patch_config(&mut self, patch: Mapping) {
pub fn patch_config(&mut self, patch: &Mapping) {
let config = if let Some(config) = self.config.as_mut() {
config
} else {