fix: resolve moved-value diagnostics (#4905)

Co-authored-by: heihutu <heihutu@gmail.com>
This commit is contained in:
houseme
2026-07-16 18:46:56 +08:00
committed by GitHub
parent d5baaa67b8
commit 1badff3923
2 changed files with 84 additions and 112 deletions
+6 -2
View File
@@ -157,8 +157,8 @@ impl LocalKmsClient {
Ok(salt)
}
#[cfg(unix)]
async fn set_file_permissions(path: &std::path::Path, permissions: Option<u32>) -> Result<()> {
#[cfg(unix)]
if let Some(mode) = permissions {
use std::os::unix::fs::PermissionsExt;
@@ -166,7 +166,11 @@ impl LocalKmsClient {
fs::set_permissions(path, perms).await?;
}
let _ = permissions;
Ok(())
}
#[cfg(not(unix))]
async fn set_file_permissions(_path: &std::path::Path, _permissions: Option<u32>) -> Result<()> {
Ok(())
}