switch from failure to anyhow
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
//! A file list catalog simply store a directory tree. Such catalogs
|
||||
//! may be used as index to do a fast search for files.
|
||||
|
||||
use failure::*;
|
||||
use anyhow::{Error};
|
||||
use std::ffi::CStr;
|
||||
|
||||
pub trait BackupCatalogWriter {
|
||||
|
@ -8,7 +8,7 @@ use std::io::{Read, Seek, SeekFrom};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::os::unix::ffi::OsStrExt;
|
||||
|
||||
use failure::*;
|
||||
use anyhow::{bail, format_err, Error};
|
||||
use libc;
|
||||
|
||||
use super::binary_search_tree::search_binary_tree_by;
|
||||
|
@ -2,7 +2,7 @@ use std::ffi::{OsStr, OsString};
|
||||
use std::os::unix::io::{AsRawFd, RawFd};
|
||||
use std::path::PathBuf;
|
||||
|
||||
use failure::{format_err, Error};
|
||||
use anyhow::{format_err, Error};
|
||||
use nix::errno::Errno;
|
||||
use nix::fcntl::OFlag;
|
||||
use nix::sys::stat::Mode;
|
||||
|
@ -10,7 +10,7 @@ use std::os::unix::io::RawFd;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use endian_trait::Endian;
|
||||
use failure::*;
|
||||
use anyhow::{bail, format_err, Error};
|
||||
use nix::errno::Errno;
|
||||
use nix::fcntl::OFlag;
|
||||
use nix::sys::stat::FileStat;
|
||||
|
@ -7,7 +7,7 @@
|
||||
use std::cmp::Ordering;
|
||||
|
||||
use endian_trait::Endian;
|
||||
use failure::{bail, Error};
|
||||
use anyhow::{bail, Error};
|
||||
use siphasher::sip::SipHasher24;
|
||||
|
||||
|
||||
|
@ -11,7 +11,7 @@ use std::os::unix::ffi::OsStrExt;
|
||||
use std::path::Path;
|
||||
use std::sync::Mutex;
|
||||
|
||||
use failure::{bail, format_err, Error};
|
||||
use anyhow::{bail, format_err, Error};
|
||||
use libc;
|
||||
use libc::{c_char, c_int, c_void, size_t};
|
||||
|
||||
|
@ -10,7 +10,7 @@ use std::fs::File;
|
||||
use std::io::Read;
|
||||
use std::os::unix::io::{FromRawFd, RawFd};
|
||||
|
||||
use failure::{bail, Error};
|
||||
use anyhow::{bail, Error};
|
||||
use libc::{c_char, c_int};
|
||||
use nix::errno::Errno;
|
||||
use nix::fcntl;
|
||||
@ -44,7 +44,7 @@ pub enum MatchType {
|
||||
/// ```
|
||||
/// # use std::ffi::CString;
|
||||
/// # use self::proxmox_backup::pxar::{MatchPattern, MatchType};
|
||||
/// # fn main() -> Result<(), failure::Error> {
|
||||
/// # fn main() -> Result<(), anyhow::Error> {
|
||||
/// let filename = CString::new("some.conf")?;
|
||||
/// let is_dir = false;
|
||||
///
|
||||
@ -223,7 +223,7 @@ impl<'a> MatchPatternSlice<'a> {
|
||||
/// original pattern.
|
||||
/// ```
|
||||
/// # use self::proxmox_backup::pxar::{MatchPattern, MatchPatternSlice, MatchType};
|
||||
/// # fn main() -> Result<(), failure::Error> {
|
||||
/// # fn main() -> Result<(), anyhow::Error> {
|
||||
/// let pattern = MatchPattern::from_line(b"some/match/pattern/")?.unwrap();
|
||||
/// let slice = pattern.as_slice();
|
||||
/// let front = slice.get_front_pattern();
|
||||
@ -246,7 +246,7 @@ impl<'a> MatchPatternSlice<'a> {
|
||||
/// If no slash is encountered, the `MatchPatternSlice` will be empty.
|
||||
/// ```
|
||||
/// # use self::proxmox_backup::pxar::{MatchPattern, MatchPatternSlice, MatchType};
|
||||
/// # fn main() -> Result<(), failure::Error> {
|
||||
/// # fn main() -> Result<(), anyhow::Error> {
|
||||
/// let pattern = MatchPattern::from_line(b"some/match/pattern/")?.unwrap();
|
||||
/// let slice = pattern.as_slice();
|
||||
/// let rest = slice.get_rest_pattern();
|
||||
@ -379,7 +379,7 @@ impl<'a> MatchPatternSlice<'a> {
|
||||
/// ```
|
||||
/// # use std::ffi::CString;
|
||||
/// # use self::proxmox_backup::pxar::{MatchPattern, MatchPatternSlice, MatchType};
|
||||
/// # fn main() -> Result<(), failure::Error> {
|
||||
/// # fn main() -> Result<(), anyhow::Error> {
|
||||
/// let patterns = vec![
|
||||
/// MatchPattern::from_line(b"some/match/pattern/")?.unwrap(),
|
||||
/// MatchPattern::from_line(b"to_match/")?.unwrap()
|
||||
@ -454,7 +454,7 @@ impl<'a> MatchPatternSlice<'a> {
|
||||
/// ```
|
||||
/// # use std::ffi::CString;
|
||||
/// # use self::proxmox_backup::pxar::{MatchPattern, MatchPatternSlice, MatchType};
|
||||
/// # fn main() -> Result<(), failure::Error> {
|
||||
/// # fn main() -> Result<(), anyhow::Error> {
|
||||
/// let patterns = vec![
|
||||
/// MatchPattern::from_line(b"some/match/pattern/")?.unwrap(),
|
||||
/// MatchPattern::from_line(b"to_match/")?.unwrap()
|
||||
|
@ -11,7 +11,7 @@ use std::os::unix::io::RawFd;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use endian_trait::Endian;
|
||||
use failure::{bail, format_err, Error};
|
||||
use anyhow::{bail, format_err, Error};
|
||||
use nix::errno::Errno;
|
||||
use nix::fcntl::OFlag;
|
||||
use nix::sys::stat::Mode;
|
||||
|
Reference in New Issue
Block a user