Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/uu/tsort/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ uucore = { workspace = true }
rustc-hash = { workspace = true }

[target.'cfg(unix)'.dependencies]
nix = { workspace = true, features = ["fs"] }
rustix = { workspace = true, features = ["fs"] }

[[bin]]
name = "tsort"
Expand Down
10 changes: 5 additions & 5 deletions src/uu/tsort/src/tsort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
target_os = "freebsd",
))]
{
use nix::fcntl::{PosixFadviseAdvice, posix_fadvise};
use rustix::fs::{Advice, fadvise};
use std::os::unix::io::AsFd;

posix_fadvise(
fadvise(
file.as_fd(),
0, // offset 0 => from the start of the file
0, // length 0 => for the whole file
PosixFadviseAdvice::POSIX_FADV_SEQUENTIAL,
0, // offset 0 => from the start of the file
None, // None => for the whole file
Advice::Sequential,
)
.ok();
}
Expand Down
Loading