Fix clippy warnings: unused imports, minor style fixes
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user