Merge pull request #1150 from ahlinc/fix/panic-on-broken-pipe
Stylistic fix for #1135 - Panic on broken pipe
This commit is contained in:
commit
9d77561c43
1 changed files with 3 additions and 4 deletions
|
|
@ -106,11 +106,10 @@ impl From<serde_json::Error> for Error {
|
|||
|
||||
impl From<io::Error> for Error {
|
||||
fn from(error: io::Error) -> Self {
|
||||
match error {
|
||||
x if x.kind() == ErrorKind::BrokenPipe => return Error::new_ignored(),
|
||||
_ => (),
|
||||
match error.kind() {
|
||||
ErrorKind::BrokenPipe => Error::new_ignored(),
|
||||
_ => Error::new(error.to_string()),
|
||||
}
|
||||
Error::new(error.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue