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:
Tunglies
2025-10-14 09:24:39 +08:00
parent 44eb781060
commit 924e7d1022
22 changed files with 167 additions and 161 deletions

View File

@@ -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),
}