只在 Unix 上编译仅供 Unix 测试使用的 SFTP 测试辅助函数
local_test_server 和 batch_to 只被 cfg(unix) 的测试调用,在 Windows 上 成了死代码,让 clippy -D warnings 失败。 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
e1c11df792
commit
a61b915808
2 files changed
+3
-1
No files matched your search
+2
-1
@@ -94,7 +94,8 @@ impl SftpClient {
|
||||
fsync,
|
||||
})
|
||||
}
|
||||
#[cfg(test)]
|
||||
/// Only the Unix tests have a local `sftp-server` to talk to.
|
||||
#[cfg(all(test, unix))]
|
||||
pub(super) async fn local_test_server(
|
||||
directory: &std::path::Path,
|
||||
) -> Result<(Self, tokio::process::Child)> {
|
||||
|
||||
@@ -1590,6 +1590,7 @@ fn an_scp_upload_takes_the_destination_name_and_keeps_the_execute_bits() {
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
async fn batch_to(
|
||||
source: &Path,
|
||||
destination: &str,
|
||||
|
||||
Reference in new issue
Block a user