Skip to content

Commit

Permalink
replace nix with rustix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kl4rry committed Jun 1, 2024
1 parent e8e4abe commit b79f68b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ignore = "0.4.20"
include_dir = "0.7.3"
lexical-sort = "0.3.1"
memchr = "2.5.0"
nix = "0.28.0"
rustix = "0.38.34"
notify = "6.0.0"
num-traits = "0.2.15"
once_cell = "1.17.1"
Expand Down
2 changes: 1 addition & 1 deletion crates/ferrite-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ unicode-segmentation = { workspace = true }
unicode-width = { workspace = true }

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

[dev-dependencies]
tempdir = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/ferrite-core/src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ impl Buffer {
metadata.permissions().readonly()
};
#[cfg(unix)]
let read_only_file = nix::unistd::access(path, nix::unistd::AccessFlags::W_OK).is_err();
let read_only_file = rustix::fs::access(path, rustix::fs::Access::WRITE_OK).is_err();
let (encoding, rope) = read::read_from_file(path)?;

let mut syntax = Syntax::new(get_buffer_proxy());
Expand Down

0 comments on commit b79f68b

Please sign in to comment.