fix: runtime error

This commit is contained in:
MystiPanda
2024-06-19 10:43:58 +08:00
parent 28ab08a7ca
commit 1d4388d444
2 changed files with 22 additions and 1 deletions

View File

@@ -85,6 +85,7 @@ fn clash_client_info() -> Result<(String, HeaderMap)> {
}
/// 缩短clash的日志
#[allow(dead_code)]
pub fn parse_log(log: String) -> String {
if log.starts_with("time=") && log.len() > 33 {
return (log[33..]).to_owned();