From 20d420e6a2983ddd635a1ef602679dc92350d6c3 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 1 Apr 2026 13:20:31 +0900 Subject: [PATCH] df: replace nix by rustix --- Cargo.lock | 2 +- src/uu/df/Cargo.toml | 2 +- src/uu/df/src/df.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index adf882f2232..ae22c7d5040 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3461,7 +3461,7 @@ dependencies = [ "clap", "codspeed-divan-compat", "fluent", - "nix", + "rustix", "tempfile", "thiserror 2.0.18", "unicode-width 0.2.2", diff --git a/src/uu/df/Cargo.toml b/src/uu/df/Cargo.toml index 9b99baa9287..dfb5aea8def 100644 --- a/src/uu/df/Cargo.toml +++ b/src/uu/df/Cargo.toml @@ -26,7 +26,7 @@ thiserror = { workspace = true } fluent = { workspace = true } [target.'cfg(unix)'.dependencies] -nix = { workspace = true, features = ["fs"] } +rustix = { workspace = true, features = ["fs"] } [dev-dependencies] divan = { workspace = true } diff --git a/src/uu/df/src/df.rs b/src/uu/df/src/df.rs index 51b950dd460..2f97814d02b 100644 --- a/src/uu/df/src/df.rs +++ b/src/uu/df/src/df.rs @@ -301,7 +301,7 @@ fn get_all_filesystems(opt: &Options) -> UResult> { // Run a sync call before any operation if so instructed. if opt.sync { #[cfg(not(any(windows, target_os = "redox")))] - nix::unistd::sync(); + rustix::fs::sync(); } let mut mounts = vec![];