mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:15:38 +08:00
Refactor string handling to use into() instead of to_string() for improved performance and consistency across the codebase. This change affects various modules including app.rs, clash.rs, config.rs, core.rs, service.rs, and others, ensuring that string conversions are streamlined and more idiomatic.
This commit is contained in:
@@ -72,7 +72,7 @@ pub async fn copy_clash_env() {
|
||||
.latest_ref()
|
||||
.proxy_host
|
||||
.clone()
|
||||
.unwrap_or_else(|| "127.0.0.1".to_string()),
|
||||
.unwrap_or_else(|| "127.0.0.1".into()),
|
||||
};
|
||||
|
||||
let app_handle = handle::Handle::app_handle();
|
||||
@@ -96,7 +96,7 @@ pub async fn copy_clash_env() {
|
||||
#[cfg(target_os = "windows")]
|
||||
let default = "powershell";
|
||||
|
||||
default.to_string()
|
||||
default.into()
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user