mirror of
https://codeberg.org/icewind/palantir.git
synced 2026-06-03 10:14:09 +02:00
procfs is linux only
This commit is contained in:
parent
dd646b48ce
commit
fdb7c3c374
2 changed files with 4 additions and 0 deletions
|
|
@ -26,6 +26,8 @@ if-addrs = "0.12.0"
|
||||||
sysconf = "0.3.4"
|
sysconf = "0.3.4"
|
||||||
thiserror = "1.0.58"
|
thiserror = "1.0.58"
|
||||||
clap = { version = "=4.4.18", features = ["derive"] }
|
clap = { version = "=4.4.18", features = ["derive"] }
|
||||||
|
|
||||||
|
[target.'cfg(not(windows))'.dependencies]
|
||||||
procfs = "0.16.0"
|
procfs = "0.16.0"
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
use procfs::ProcError;
|
use procfs::ProcError;
|
||||||
use std::ffi::NulError;
|
use std::ffi::NulError;
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
|
|
@ -36,6 +37,7 @@ pub enum Error {
|
||||||
InvalidStringData(#[from] Utf8Error),
|
InvalidStringData(#[from] Utf8Error),
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
InvalidCStringData(#[from] NulError),
|
InvalidCStringData(#[from] NulError),
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Proc(#[from] ProcError),
|
Proc(#[from] ProcError),
|
||||||
#[error("Failed to query vfs stats")]
|
#[error("Failed to query vfs stats")]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue