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

@@ -57,6 +57,12 @@ pub struct AsyncLocalFs {
root: PathBuf,
}
impl Default for AsyncLocalFs {
fn default() -> Self {
Self::new()
}
}
impl AsyncLocalFs {
pub fn new() -> Self {
Self { root: PathBuf::new() }
@@ -153,7 +159,7 @@ impl super::AsyncVfsBackend for AsyncLocalFs {
})
}
fn create_dir<'a>(&'a self, path: &'a Path, mode: u32) -> Pin<Box<dyn Future<Output = Result<(), VfsError>> + Send + 'a>> {
fn create_dir<'a>(&'a self, path: &'a Path, _mode: u32) -> Pin<Box<dyn Future<Output = Result<(), VfsError>> + Send + 'a>> {
Box::pin(async move {
fs::create_dir(path).await
.map_err(|e| Self::map_io_error(path, e))?;