refactor: cargo clippy

This commit is contained in:
MystiPanda
2024-01-10 17:36:35 +08:00
parent 17d8691300
commit 3a883b9e41
19 changed files with 96 additions and 122 deletions

View File

@@ -65,8 +65,8 @@ impl IClashTemp {
let config = &self.0;
ClashInfo {
port: Self::guard_mixed_port(&config),
server: Self::guard_client_ctrl(&config),
port: Self::guard_mixed_port(config),
server: Self::guard_client_ctrl(config),
secret: config.get("secret").and_then(|value| match value {
Value::String(val_str) => Some(val_str.clone()),
Value::Bool(val_bool) => Some(val_bool.to_string()),
@@ -98,7 +98,7 @@ impl IClashTemp {
Some(val_str) => {
let val_str = val_str.trim();
let val = match val_str.starts_with(":") {
let val = match val_str.starts_with(':') {
true => format!("127.0.0.1{val_str}"),
false => val_str.to_owned(),
};