diff --git a/userspace/ksud/src/utils.rs b/userspace/ksud/src/utils.rs index acfd4d01..dace68ef 100644 --- a/userspace/ksud/src/utils.rs +++ b/userspace/ksud/src/utils.rs @@ -265,7 +265,7 @@ fn copy_xattrs(src_path: impl AsRef, dest_path: impl AsRef) -> Resul } Ok(()) } - + #[cfg(any(target_os = "linux", target_os = "android"))] pub fn copy_module_files(source: impl AsRef, destination: impl AsRef) -> Result<()> { use rustix::fs::FileTypeExt; @@ -285,9 +285,7 @@ pub fn copy_module_files(source: impl AsRef, destination: impl AsRef if entry.file_type().is_file() { std::fs::copy(&source_path, &dest_path).with_context(|| { - format!( - "Failed to copy file from {source_path:?} to {dest_path:?}", - ) + format!("Failed to copy file from {source_path:?} to {dest_path:?}",) })?; copy_xattrs(&source_path, &dest_path)?; } else if entry.file_type().is_symlink() { @@ -337,4 +335,4 @@ pub fn copy_module_files(source: impl AsRef, destination: impl AsRef #[cfg(not(any(target_os = "linux", target_os = "android")))] pub fn copy_module_files(_source: impl AsRef, _destination: impl AsRef) -> Result<()> { unimplemented!() -} \ No newline at end of file +}