mirror of
				https://github.com/kata-containers/kata-containers.git
				synced 2025-10-31 17:37:20 +00:00 
			
		
		
		
	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:
		| @@ -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; | ||||||
|   | |||||||
| @@ -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) |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @@ -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; | ||||||
|   | |||||||
| @@ -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}; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user