From 8150a43970820d75c5c5506445befd14723e5dce Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 17 Apr 2020 11:15:18 +0200 Subject: [PATCH] replace failure with anyhow Signed-off-by: Wolfgang Bumiller --- Cargo.toml | 2 +- src/client.rs | 2 +- src/io/seq_packet.rs | 2 +- src/lxcseccomp.rs | 2 +- src/main.rs | 2 +- src/process/pid_fd.rs | 2 +- src/process/user_caps.rs | 2 +- src/sys_mknod.rs | 2 +- src/sys_quotactl.rs | 2 +- src/syscall.rs | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 191c305..0b01d52 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ exclude = [ "build", "debian" ] [dependencies] bitflags = "1.2" -failure = { version = "0.1", default-features = false, features = [ "std" ] } +anyhow = "1.0" lazy_static = "1.4" libc = "0.2" nix = "0.16" diff --git a/src/client.rs b/src/client.rs index 4730fa9..88bf159 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1,6 +1,6 @@ use std::sync::Arc; -use failure::Error; +use anyhow::Error; use nix::errno::Errno; use crate::io::seq_packet::SeqPacketSocket; diff --git a/src/io/seq_packet.rs b/src/io/seq_packet.rs index aa5a62e..df8382b 100644 --- a/src/io/seq_packet.rs +++ b/src/io/seq_packet.rs @@ -2,7 +2,7 @@ use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; use std::task::{Context, Poll}; use std::{io, ptr}; -use failure::Error; +use anyhow::Error; use nix::sys::socket::{self, AddressFamily, SockAddr, SockFlag, SockType}; use crate::io::iovec::{IoVec, IoVecMut}; diff --git a/src/lxcseccomp.rs b/src/lxcseccomp.rs index 31fa158..587e261 100644 --- a/src/lxcseccomp.rs +++ b/src/lxcseccomp.rs @@ -7,7 +7,7 @@ use std::os::unix::fs::FileExt; use std::os::unix::io::{FromRawFd, RawFd}; use std::{io, mem}; -use failure::{bail, format_err, Error}; +use anyhow::{bail, format_err, Error}; use lazy_static::lazy_static; use libc::pid_t; use nix::errno::Errno; diff --git a/src/main.rs b/src/main.rs index 3e2dc00..a0f34b7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,7 @@ use std::io as StdIo; use std::io::{stderr, stdout, Write}; use std::os::unix::ffi::OsStrExt; -use failure::{bail, format_err, Error}; +use anyhow::{bail, format_err, Error}; use nix::sys::socket::SockAddr; #[macro_use] diff --git a/src/process/pid_fd.rs b/src/process/pid_fd.rs index 86871f2..674ebae 100644 --- a/src/process/pid_fd.rs +++ b/src/process/pid_fd.rs @@ -6,7 +6,7 @@ use std::os::raw::c_int; use std::os::unix::ffi::OsStringExt; use std::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd}; -use failure::{bail, Error}; +use anyhow::{bail, Error}; use libc::pid_t; use crate::capability::Capabilities; diff --git a/src/process/user_caps.rs b/src/process/user_caps.rs index 91e9276..a3d6bcb 100644 --- a/src/process/user_caps.rs +++ b/src/process/user_caps.rs @@ -4,7 +4,7 @@ use std::ffi::{OsStr, OsString}; use std::io; use std::os::unix::ffi::OsStrExt; -use failure::Error; +use anyhow::Error; use super::PidFd; use crate::capability::Capabilities; diff --git a/src/sys_mknod.rs b/src/sys_mknod.rs index 35b3a11..a498b77 100644 --- a/src/sys_mknod.rs +++ b/src/sys_mknod.rs @@ -1,7 +1,7 @@ use std::ffi::CString; use std::os::unix::io::AsRawFd; -use failure::Error; +use anyhow::Error; use nix::errno::Errno; use nix::sys::stat; diff --git a/src/sys_quotactl.rs b/src/sys_quotactl.rs index c94edd3..8a243fd 100644 --- a/src/sys_quotactl.rs +++ b/src/sys_quotactl.rs @@ -3,7 +3,7 @@ use std::ffi::CString; use std::os::raw::{c_int, c_uint}; use std::{io, mem, ptr}; -use failure::Error; +use anyhow::Error; use nix::errno::Errno; use crate::fork::forking_syscall; diff --git a/src/syscall.rs b/src/syscall.rs index 0125303..76e63d6 100644 --- a/src/syscall.rs +++ b/src/syscall.rs @@ -1,7 +1,7 @@ use std::ffi::CString; use std::os::raw::c_int; -use failure::Error; +use anyhow::Error; use nix::errno::Errno; use crate::lxcseccomp::ProxyMessageBuffer;