chore: linting

This commit is contained in:
zhom
2026-07-11 19:58:45 +04:00
parent eeb5c816bf
commit 53db00a85a
2 changed files with 5 additions and 7 deletions
+1 -1
View File
@@ -1243,7 +1243,7 @@ impl AppAutoUpdater {
if !log_content.is_empty() {
log::info!(
"Log file content (last 500 chars): {}",
&log_content
log_content
.chars()
.rev()
.take(500)
+4 -6
View File
@@ -1298,10 +1298,9 @@ impl ProxyManager {
("socks5", rest) // Default socks to socks5
} else if let Some(rest) = line.strip_prefix("ss://") {
("ss", rest)
} else if let Some(rest) = line.strip_prefix("shadowsocks://") {
("ss", rest)
} else {
return None;
let rest = line.strip_prefix("shadowsocks://")?;
("ss", rest)
};
// Check if there's auth (contains @)
@@ -1365,13 +1364,12 @@ impl ProxyManager {
let host_port = &line[at_pos + 1..];
// Parse auth
let (username, password) = if let Some(colon_pos) = auth.find(':') {
let (username, password) = {
let colon_pos = auth.find(':')?;
(
Some(auth[..colon_pos].to_string()),
Some(auth[colon_pos + 1..].to_string()),
)
} else {
return None;
};
// Parse host:port