diff options
author | Kyohei Uto <im@kyoheiu.dev> | 2023-05-05 13:05:25 +0900 |
---|---|---|
committer | Kyohei Uto <im@kyoheiu.dev> | 2023-05-05 13:05:25 +0900 |
commit | 68c2ca4cc28e8029ef39f24ccbd1f1024c54e9db (patch) | |
tree | 03f44310262463020edf248950b0672205cab74d | |
parent | 7edebfbb6f15f1f8e69b306dab5c52423555c2eb (diff) |
Fix build
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/state.rs | 3 |
2 files changed, 4 insertions, 1 deletions
@@ -40,7 +40,7 @@ unicode-width = "0.1.10" devtimer = "4.0.0" rayon = "1.6.1" -[target.'cfg(any(target_os = "linux", target_os = "netbsd"))'.dependencies] +[target.'cfg(unix)'.dependencies] nix = {version = "0.25.0", features = ["process"]} [dependencies.serde] diff --git a/src/state.rs b/src/state.rs index 40aaa42..c3f65f5 100644 --- a/src/state.rs +++ b/src/state.rs @@ -27,8 +27,11 @@ use syntect::highlighting::{Theme, ThemeSet}; #[cfg(target_family = "unix")] use std::os::unix::fs::PermissionsExt; +#[cfg(target_family = "unix")] use std::os::unix::fs::MetadataExt; +#[cfg(target_family = "unix")] use nix::sys::stat::Mode; +#[cfg(target_family = "unix")] use nix::unistd::{Gid, Uid}; pub const FELIX: &str = "felix"; |