1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

csplit: removed unnecesary implementation of From<io::Error> (#7778)

This commit is contained in:
Lukas 2025-04-18 14:28:13 +02:00 committed by GitHub
parent 38ef20c385
commit d59ac4912c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,7 +12,7 @@ use uucore::error::UError;
#[derive(Debug, Error)]
pub enum CsplitError {
#[error("IO error: {}", _0)]
IoError(io::Error),
IoError(#[from] io::Error),
#[error("{}: line number out of range", ._0.quote())]
LineOutOfRange(String),
#[error("{}: line number out of range on repetition {}", ._0.quote(), _1)]
@ -39,12 +39,6 @@ pub enum CsplitError {
UError(Box<dyn UError>),
}
impl From<io::Error> for CsplitError {
fn from(error: io::Error) -> Self {
Self::IoError(error)
}
}
impl From<Box<dyn UError>> for CsplitError {
fn from(error: Box<dyn UError>) -> Self {
Self::UError(error)