Skip to content

Commit 8559c03

Browse files
lukasx999nickorlow
authored andcommitted
csplit: removed unnecesary implementation of From<io::Error> (uutils#7778)
1 parent 3f0111b commit 8559c03

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/uu/csplit/src/csplit_error.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use uucore::error::UError;
1212
#[derive(Debug, Error)]
1313
pub enum CsplitError {
1414
#[error("IO error: {}", _0)]
15-
IoError(io::Error),
15+
IoError(#[from] io::Error),
1616
#[error("{}: line number out of range", ._0.quote())]
1717
LineOutOfRange(String),
1818
#[error("{}: line number out of range on repetition {}", ._0.quote(), _1)]
@@ -39,12 +39,6 @@ pub enum CsplitError {
3939
UError(Box<dyn UError>),
4040
}
4141

42-
impl From<io::Error> for CsplitError {
43-
fn from(error: io::Error) -> Self {
44-
Self::IoError(error)
45-
}
46-
}
47-
4842
impl From<Box<dyn UError>> for CsplitError {
4943
fn from(error: Box<dyn UError>) -> Self {
5044
Self::UError(error)

0 commit comments

Comments
 (0)