refactor use if-let instead of match for single match
@@ -235,13 +235,10 @@ where
}
}
- match self.strategy.poll() {
- Some(StrategyEvent::Send { peer_id, block }) => {
+ if let Some(StrategyEvent::Send { peer_id, block }) = self.strategy.poll() {
self.send_block(peer_id, block);
task::current().notify();
}
- None => {}
- }
Async::NotReady
}
