A: Code quality improvements - fix clippy warnings
- 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:
@@ -140,11 +140,11 @@ impl VfsBackend for SmbVfs {
|
||||
|
||||
fn open_file(&self, path: &Path, flags: &OpenFlags) -> Result<Box<dyn VfsFile>, VfsError> {
|
||||
let smb_path = Self::path_to_str(path);
|
||||
let mut client = self
|
||||
let _client = self
|
||||
.client
|
||||
.lock()
|
||||
.map_err(|e| VfsError::Io(e.to_string()))?;
|
||||
let mut tree = self.tree.lock().map_err(|e| VfsError::Io(e.to_string()))?;
|
||||
let tree = self.tree.lock().map_err(|e| VfsError::Io(e.to_string()))?;
|
||||
|
||||
if flags.write || flags.create || flags.truncate {
|
||||
Ok(Box::new(SmbVfsFile {
|
||||
@@ -165,7 +165,7 @@ impl VfsBackend for SmbVfs {
|
||||
// Streaming read: open file and store file_id
|
||||
let (file_id, file_size) = {
|
||||
let mut client = self.client.lock().map_err(|e| VfsError::Io(e.to_string()))?;
|
||||
let mut tree = self.tree.lock().unwrap();
|
||||
let tree = self.tree.lock().unwrap();
|
||||
self.runtime
|
||||
.block_on(tree.open_file(client.connection_mut(), &smb_path))
|
||||
.map_err(map_smb_error)?
|
||||
|
||||
Reference in New Issue
Block a user