summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock16
-rw-r--r--Cargo.toml2
-rw-r--r--src/util.rs5
3 files changed, 10 insertions, 13 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 7867c03..7d92ae1 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -34,9 +34,9 @@ dependencies = [
[[package]]
name = "cc"
-version = "1.0.68"
+version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4a72c244c1ff497a746a7e1fb3d14bd08420ecda70c8f25c7112f2781652d787"
+checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2"
[[package]]
name = "cfg-if"
@@ -52,9 +52,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "cpufeatures"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed00c67cb5d0a7d64a44f6ad2668db7e7530311dd53ea79bcd4fb022c64911c8"
+checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef"
dependencies = [
"libc",
]
@@ -221,9 +221,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
-version = "0.2.97"
+version = "0.2.98"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6"
+checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790"
[[package]]
name = "linked-hash-map"
@@ -299,9 +299,9 @@ dependencies = [
[[package]]
name = "nix"
-version = "0.21.0"
+version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c3728fec49d363a50a8828a190b379a446cc5cf085c06259bbbeb34447e4ec7"
+checksum = "cf1e25ee6b412c2a1e3fcb6a4499a5c1bfe7f43e014bdce9a6b6666e5aa2d187"
dependencies = [
"bitflags",
"cc",
diff --git a/Cargo.toml b/Cargo.toml
index 0bf8d69..359c0e1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,7 @@ edition = "2018"
hex = { version = "0.4.3", features = ["std", "serde"] }
ipc-channel = { git = "https://github.com/servo/ipc-channel.git" }
libc = "0.2.84"
-nix = "0.21.0"
+nix = "0.22.0"
oci-spec = "0.2.8"
olpc-cjson = "0.1.0"
serde = { version = "1", features = ["derive"] }
diff --git a/src/util.rs b/src/util.rs
index 5791564..ace2cb7 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -16,10 +16,7 @@ pub trait ToIOResult<T> {
impl<T> ToIOResult<T> for nix::Result<T> {
fn to_io_result(self) -> Result<T> {
- self.map_err(|error| match error {
- nix::Error::Sys(code) => Error::from_raw_os_error(code as i32),
- _ => Error::new(ErrorKind::Other, error),
- })
+ self.map_err(From::from)
}
}