summaryrefslogtreecommitdiff
path: root/src/util.rs
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2021-12-24 04:28:30 -0600
committerAlejandro Soto <alejandro@34project.org>2021-12-24 04:34:19 -0600
commit7f3c0f5b69e76de03417c84d3d217c0bf866e5ec (patch)
tree8b11657b42384c97966ffe607c79a5903235fd7f /src/util.rs
parentfc6f4052648a77a66f6bd50ffd1647992cb68b10 (diff)
Update dependencies
Diffstat (limited to '')
-rw-r--r--src/util.rs14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/util.rs b/src/util.rs
index dba954b..7263738 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -3,7 +3,7 @@ use std::{
os::unix::io::{IntoRawFd, RawFd},
};
-use nix::{self, errno::Errno, unistd::close};
+use nix::unistd::close;
use quick_error::quick_error;
quick_error! {
@@ -79,18 +79,6 @@ impl<'a> Iterator for OutputChainIter<'a> {
}
}
-pub fn from_nix_error(error: nix::Error) -> std::io::Error {
- use nix::Error::*;
- let from_raw = |code| std::io::Error::from_raw_os_error(code as i32);
-
- match error {
- Sys(errno) => errno.into(),
- InvalidPath => from_raw(Errno::ENAMETOOLONG),
- InvalidUtf8 => from_raw(Errno::EILSEQ),
- UnsupportedOperation => from_raw(Errno::EOPNOTSUPP),
- }
-}
-
pub fn display_or<'a, T: fmt::Display + 'a>(
maybe: Option<T>,
default: &'a str,