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),
|
None => format!("{:?} was terminated by signal", command),
|
||||||
};
|
};
|
||||||
|
|
||||||
return Err(io::Error::new(io::ErrorKind::Other, err));
|
return Err(io::Error::other(err));
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(out)
|
Ok(out)
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ impl error::Error for ErrorStack {}
|
||||||
|
|
||||||
impl From<ErrorStack> for io::Error {
|
impl From<ErrorStack> for io::Error {
|
||||||
fn from(e: ErrorStack) -> 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(ref e) if e.code() == ErrorCode::WANT_READ && e.io_error().is_none() => {}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
return Err(e
|
return Err(e.into_io_error().unwrap_or_else(io::Error::other));
|
||||||
.into_io_error()
|
|
||||||
.unwrap_or_else(|e| io::Error::new(io::ErrorKind::Other, e)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4167,9 +4165,7 @@ impl<S: Read + Write> Write for SslStream<S> {
|
||||||
Ok(n) => return Ok(n),
|
Ok(n) => return Ok(n),
|
||||||
Err(ref e) if e.code() == ErrorCode::WANT_READ && e.io_error().is_none() => {}
|
Err(ref e) if e.code() == ErrorCode::WANT_READ && e.io_error().is_none() => {}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
return Err(e
|
return Err(e.into_io_error().unwrap_or_else(io::Error::other));
|
||||||
.into_io_error()
|
|
||||||
.unwrap_or_else(|e| io::Error::new(io::ErrorKind::Other, e)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,7 @@ where
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
return Poll::Ready(Err(e
|
return Poll::Ready(Err(e
|
||||||
.into_io_error()
|
.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