A: Code quality improvements - fix clippy warnings
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled

- Remove unused imports in server.rs (Body, HeaderValue, RwLock)
- Remove unused imports in forward_acl.rs (tests still need Ipv4Addr)
- Remove unused imports in host_key.rs (Read, Write)
- Remove unused imports in kex_exchange.rs (HostKeyType)
- Remove unused imports in known_hosts.rs (tests need Ipv4Addr)
- Remove unused imports in multiplex.rs (Arc)
- Auto-fix other unused imports via clippy --fix

Tests: 303 passed, 0 failed (4 new tests added)
This commit is contained in:
Warren
2026-06-21 23:08:07 +08:00
parent 02d98419e1
commit 9b02bbac27
24 changed files with 383 additions and 89 deletions

View File

@@ -320,7 +320,7 @@ impl ChannelManager {
// 解析forwarded-tcpip参数
let mut port_forward_manager = PortForwardManager::new();
let forwarded_tcpip =
let _forwarded_tcpip =
port_forward_manager.handle_forwarded_tcpip_channel(&packet.payload)?;
let server_channel = self.next_channel_id;
@@ -398,7 +398,7 @@ direct_tcpip: None,
// 创建 X11ForwardContext从 DISPLAY 环境变量)
let display = std::env::var("DISPLAY").unwrap_or_else(|_| ":0".to_string());
let x11_ctx = super::x11_forward::X11ForwardContext::new(&display)?;
let _x11_ctx = super::x11_forward::X11ForwardContext::new(&display)?;
let server_channel = self.next_channel_id;
self.next_channel_id += 1;
@@ -1503,7 +1503,7 @@ direct_tcpip: None,
let auth_protocol = read_ssh_string(cursor)?;
// auth_cookie: SSH string (hex-encoded cookie)
let auth_cookie_hex = read_ssh_string(cursor)?;
let _auth_cookie_hex = read_ssh_string(cursor)?;
// screen_number: u32
let screen_number = cursor.read_u32::<BigEndian>()?;