|
|
@@ -117,6 +117,7 @@ impl Server {
|
|
|
result = result => Some(result),
|
|
|
_ = this.interrupt.notified() => None,
|
|
|
};
|
|
|
+ #[allow(clippy::let_and_return)]
|
|
|
let ret = match result {
|
|
|
Some(Ok(ret)) => ret,
|
|
|
Some(Err(_)) => Err(std::io::Error::new(
|
|
|
@@ -292,8 +293,7 @@ mod tests {
|
|
|
|
|
|
assert_eq!(
|
|
|
reply
|
|
|
- .err()
|
|
|
- .expect("Aborting RPC should return error")
|
|
|
+ .expect_err("Aborting RPC should return error")
|
|
|
.kind(),
|
|
|
std::io::ErrorKind::ConnectionReset,
|
|
|
);
|
|
|
@@ -316,8 +316,7 @@ mod tests {
|
|
|
|
|
|
assert_eq!(
|
|
|
reply
|
|
|
- .err()
|
|
|
- .expect("Interrupted server should return error")
|
|
|
+ .expect_err("Interrupted server should return error")
|
|
|
.kind(),
|
|
|
std::io::ErrorKind::Interrupted,
|
|
|
);
|