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:
@@ -108,7 +108,7 @@ pub fn find_target_icons(target: &str) -> Result<Option<String>> {
|
||||
match matching_files.first() {
|
||||
Some(first_path) => {
|
||||
let first = path_to_str(first_path)?;
|
||||
Ok(Some(first.to_string()))
|
||||
Ok(Some(first.into()))
|
||||
}
|
||||
None => Ok(None),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user