diff options
author | rabite <rabite@posteo.de> | 2020-02-12 21:23:58 +0100 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2020-02-12 21:26:39 +0100 |
commit | 02e767cf5079aa9f96ec71a6fb9995603a5a95e5 (patch) | |
tree | 126e9923800feb34d04c9946b0a0fb6ebd356b50 /src/fail.rs | |
parent | b3f1452a59030c483e08dc1ca9f6d91562a6f87b (diff) |
switch to nix for killing preview subprocess
Diffstat (limited to 'src/fail.rs')
-rw-r--r-- | src/fail.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/fail.rs b/src/fail.rs index 0f05455..cf5acab 100644 --- a/src/fail.rs +++ b/src/fail.rs @@ -105,7 +105,9 @@ pub enum HError { #[fail(display = "FileBrowser needs to know about all tab's files to run exec!")] FileBrowserNeedTabFiles, #[fail(display = "{}", _0)] - FileError(crate::files::FileError) + FileError(crate::files::FileError), + #[fail(display = "{}", _0)] + Nix(#[cause] nix::Error) } impl HError { @@ -367,6 +369,13 @@ impl From<std::num::ParseIntError> for HError { } } +impl From<nix::Error> for HError { + fn from(error: nix::Error) -> Self { + let err = HError::Nix(error); + err + } +} + impl From<std::char::ParseCharError> for HError { fn from(error: std::char::ParseCharError) -> Self { let err = HError::ParseCharError(error); |