diff options
author | Kyohei Uto <im@kyoheiu.dev> | 2022-11-27 14:43:03 +0900 |
---|---|---|
committer | Kyohei Uto <im@kyoheiu.dev> | 2022-11-27 14:43:03 +0900 |
commit | e11e1c1fa859000c61ac7fa3e43f20b7c09dc229 (patch) | |
tree | c37f512b510f9e6b17d0243c1d37445f9be92c85 /src/errors.rs | |
parent | 0376a0854d99804f643783673c78b73e383aec3d (diff) |
Specify target os around open_file_in_new_window
Diffstat (limited to 'src/errors.rs')
-rw-r--r-- | src/errors.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/errors.rs b/src/errors.rs index d8b1a3f..4a201d2 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -17,8 +17,9 @@ pub enum FxError { TooSmallWindowSize, Log(String), Unpack(String), - Nix(String), Panic, + #[cfg(target_os = "linux")] + Nix(String), } impl std::error::Error for FxError {} @@ -89,6 +90,7 @@ impl From<zip::result::ZipError> for FxError { } } +#[cfg(target_os = "linux")] impl From<nix::errno::Errno> for FxError { fn from(err: nix::errno::Errno) -> Self { FxError::Nix(err.to_string()) |