Clippy
This commit is contained in:
parent
9b34d3524b
commit
23863ffd1b
|
|
@ -541,7 +541,7 @@ fn run_command(command: &mut Command) -> io::Result<Output> {
|
|||
None => format!("{:?} was terminated by signal", command),
|
||||
};
|
||||
|
||||
return Err(io::Error::new(io::ErrorKind::Other, err));
|
||||
return Err(io::Error::other(err));
|
||||
}
|
||||
|
||||
Ok(out)
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ impl error::Error for ErrorStack {}
|
|||
|
||||
impl From<ErrorStack> for io::Error {
|
||||
fn from(e: ErrorStack) -> io::Error {
|
||||
io::Error::new(io::ErrorKind::Other, e)
|
||||
io::Error::other(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3943,9 +3943,7 @@ impl<S: Read + Write> SslStream<S> {
|
|||
}
|
||||
Err(ref e) if e.code() == ErrorCode::WANT_READ && e.io_error().is_none() => {}
|
||||
Err(e) => {
|
||||
return Err(e
|
||||
.into_io_error()
|
||||
.unwrap_or_else(|e| io::Error::new(io::ErrorKind::Other, e)));
|
||||
return Err(e.into_io_error().unwrap_or_else(io::Error::other));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4167,9 +4165,7 @@ impl<S: Read + Write> Write for SslStream<S> {
|
|||
Ok(n) => return Ok(n),
|
||||
Err(ref e) if e.code() == ErrorCode::WANT_READ && e.io_error().is_none() => {}
|
||||
Err(e) => {
|
||||
return Err(e
|
||||
.into_io_error()
|
||||
.unwrap_or_else(|e| io::Error::new(io::ErrorKind::Other, e)));
|
||||
return Err(e.into_io_error().unwrap_or_else(io::Error::other));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ where
|
|||
Err(e) => {
|
||||
return Poll::Ready(Err(e
|
||||
.into_io_error()
|
||||
.unwrap_or_else(|e| io::Error::new(io::ErrorKind::Other, e))));
|
||||
.unwrap_or_else(io::Error::other)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue