drop io_err_other in favor of std::io::Error::other

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2024-07-26 13:07:34 +02:00
parent bc80a46b72
commit 1a98063bd9
3 changed files with 2 additions and 9 deletions

View File

@ -1,5 +0,0 @@
use std::io;
pub fn io_err_other<E: ToString>(e: E) -> io::Error {
io::Error::new(io::ErrorKind::Other, e.to_string())
}

View File

@ -15,7 +15,6 @@ mod macros;
pub mod apparmor; pub mod apparmor;
pub mod capability; pub mod capability;
pub mod client; pub mod client;
pub mod error;
pub mod fork; pub mod fork;
pub mod io; pub mod io;
pub mod lxcseccomp; pub mod lxcseccomp;

View File

@ -10,7 +10,6 @@ use anyhow::{bail, Error};
use libc::pid_t; use libc::pid_t;
use crate::capability::Capabilities; use crate::capability::Capabilities;
use crate::error::io_err_other;
use crate::nsfd::{ns_type, NsFd}; use crate::nsfd::{ns_type, NsFd};
use super::{CGroups, IdMap, IdMapEntry, ProcStatus, Uids, UserCaps}; use super::{CGroups, IdMap, IdMapEntry, ProcStatus, Uids, UserCaps};
@ -153,7 +152,7 @@ impl PidFd {
})?, })?,
16, 16,
) )
.map_err(io_err_other) .map_err(io::Error::other)
} }
#[inline] #[inline]
@ -164,7 +163,7 @@ impl PidFd {
})?, })?,
8, 8,
) )
.map_err(io_err_other) .map_err(io::Error::other)
} }
let mut ids = Uids::default(); let mut ids = Uids::default();