agent/rustjail: remove rustjail::errors

`anyhow` replaces `rustjail::errors`, hence it's not longer needed

Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
Julio Montes 2020-08-28 13:55:57 -05:00
parent fbb79739c9
commit 46d7b9b8dc
4 changed files with 2 additions and 38 deletions

View File

@ -14,7 +14,7 @@ use std::os::unix::io::RawFd;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::time::SystemTime; use std::time::SystemTime;
// use crate::sync::Cond; // use crate::sync::Cond;
use anyhow::{anyhow, Context, Result}; use anyhow::{anyhow, bail, Context, Result};
use libc::pid_t; use libc::pid_t;
use oci::{LinuxDevice, LinuxIDMapping}; use oci::{LinuxDevice, LinuxIDMapping};
use std::clone::Clone; use std::clone::Clone;

View File

@ -1,34 +0,0 @@
// Copyright (c) 2019 Ant Financial
//
// SPDX-License-Identifier: Apache-2.0
//
// define errors here
error_chain! {
types {
Error, ErrorKind, ResultExt, Result;
}
// foreign error conv to chain error
foreign_links {
Io(std::io::Error);
Nix(nix::Error);
Ffi(std::ffi::NulError);
Caps(caps::errors::Error);
Serde(serde_json::Error);
FromUTF8(std::string::FromUtf8Error);
Parse(std::num::ParseIntError);
Scanfmt(scan_fmt::parse::ScanError);
Ip(std::net::AddrParseError);
Regex(regex::Error);
EnvVar(std::env::VarError);
UTF8(std::str::Utf8Error);
}
// define new errors
errors {
ErrorCode(t: String) {
description("Error Code")
display("Error Code: '{}'", t)
}
}
}

View File

@ -13,7 +13,6 @@
#![allow(non_upper_case_globals)] #![allow(non_upper_case_globals)]
// #![allow(unused_comparisons)] // #![allow(unused_comparisons)]
#[macro_use] #[macro_use]
extern crate error_chain;
extern crate serde; extern crate serde;
extern crate serde_json; extern crate serde_json;
#[macro_use] #[macro_use]
@ -45,7 +44,6 @@ macro_rules! sl {
pub mod capabilities; pub mod capabilities;
pub mod cgroups; pub mod cgroups;
pub mod container; pub mod container;
pub mod errors;
pub mod mount; pub mod mount;
pub mod process; pub mod process;
pub mod specconv; pub mod specconv;

View File

@ -3,7 +3,7 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
// //
use anyhow::{anyhow, Context, Error, Result}; use anyhow::{anyhow, bail, Context, Error, Result};
use libc::uid_t; use libc::uid_t;
use nix::errno::Errno; use nix::errno::Errno;
use nix::fcntl::{self, OFlag}; use nix::fcntl::{self, OFlag};