mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:02:22 +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:
@@ -86,7 +86,7 @@ impl WebDavClient {
|
||||
|| verge.webdav_username.is_none()
|
||||
|| verge.webdav_password.is_none()
|
||||
{
|
||||
let msg = "Unable to create web dav client, please make sure the webdav config is correct".to_string();
|
||||
let msg: String = "Unable to create web dav client, please make sure the webdav config is correct".into();
|
||||
return Err(anyhow::Error::msg(msg));
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ impl WebDavClient {
|
||||
.webdav_url
|
||||
.unwrap_or_default()
|
||||
.trim_end_matches('/')
|
||||
.to_string(),
|
||||
.into(),
|
||||
username: verge.webdav_username.unwrap_or_default(),
|
||||
password: verge.webdav_password.unwrap_or_default(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user