Unverified Commit 997706a3 authored by Alexandru Vasile's avatar Alexandru Vasile
Browse files

style: Single line return errors


Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
parent 0f255ad3
Pipeline #200793 passed with stages
in 6 minutes and 17 seconds
......@@ -907,21 +907,16 @@ impl SubscriptionSink {
let conn_closed = match self.close_notify.as_ref().map(|cn| cn.handle()) {
Some(cn) => cn,
None => {
return SubscriptionClosed::RemotePeerAborted;
}
None => return SubscriptionClosed::RemotePeerAborted,
};
let mut sub_closed = match self.unsubscribe.as_ref() {
Some(rx) => rx.clone(),
_ => {
let err = ErrorObject::owned(
_ => return SubscriptionClosed::Failed(ErrorObject::owned(
INTERNAL_ERROR_CODE,
"Unsubscribe watcher not set after accepting the subscription".to_string(),
None::<()>
);
return SubscriptionClosed::Failed(err);
}
)),
};
let sub_closed_fut = sub_closed.changed();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment