Skip to content

Commit 567b0da

Browse files
committed
clippy: flatten match in subscription::recv
1 parent 8a60cf9 commit 567b0da

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/robust_provider/subscription.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,13 @@ impl<N: Network> RobustSubscription<N> {
109109
loop {
110110
let recv_result = timeout(subscription_timeout, self.subscription.recv()).await;
111111
match recv_result {
112-
Ok(recv_result) => match recv_result {
113-
Ok(header) => {
114-
if self.is_on_fallback() {
115-
self.try_reconnect_to_primary(false).await;
116-
}
117-
return Ok(header);
112+
Ok(Ok(header)) => {
113+
if self.is_on_fallback() {
114+
self.try_reconnect_to_primary(false).await;
118115
}
119-
Err(recv_error) => return Err(recv_error.into()),
120-
},
116+
return Ok(header);
117+
}
118+
Ok(Err(recv_error)) => return Err(recv_error.into()),
121119
Err(_) => {
122120
warn!(
123121
timeout_secs = subscription_timeout.as_secs(),

0 commit comments

Comments
 (0)