Fix clippy warnings: unused imports, minor style fixes
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled

This commit is contained in:
Warren
2026-06-20 21:08:50 +08:00
parent 24029501d9
commit dbca6e6d35
7 changed files with 18 additions and 21 deletions

View File

@@ -1340,7 +1340,7 @@ impl ChannelManager {
/// ⭐⭐⭐⭐⭐ Phase 17: Check if a specific channel has an exec process
pub fn channel_has_exec_process(&self, channel_id: u32) -> bool {
self.channels.get(&channel_id).map_or(false, |ch| ch.exec_process.is_some())
self.channels.get(&channel_id).is_some_and(|ch| ch.exec_process.is_some())
}
/// 获取channel输出Phase 6新增
@@ -2053,8 +2053,8 @@ impl ChannelManager {
}
}
}
} else if command.contains("rsync") {
if command.contains("--server") {
} else if command.contains("rsync")
&& command.contains("--server") {
let parts: Vec<&str> = command.split_whitespace().collect();
for part in parts.iter().rev() {
if !part.starts_with("-") && !part.contains("--") && *part != "rsync" && *part != "--server" && *part != "--sender" {
@@ -2062,7 +2062,6 @@ impl ChannelManager {
}
}
}
}
None
}
}