mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
clippy: add redundant_else clippy lint (#10525)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -599,10 +599,9 @@ impl Future for ActiveSession {
|
||||
Poll::Ready(None) => {
|
||||
if this.is_disconnecting() {
|
||||
break
|
||||
} else {
|
||||
debug!(target: "net::session", remote_peer_id=?this.remote_peer_id, "eth stream completed");
|
||||
return this.emit_disconnect(cx)
|
||||
}
|
||||
debug!(target: "net::session", remote_peer_id=?this.remote_peer_id, "eth stream completed");
|
||||
return this.emit_disconnect(cx)
|
||||
}
|
||||
Poll::Ready(Some(res)) => {
|
||||
match res {
|
||||
|
||||
@ -275,9 +275,8 @@ impl TransactionFetcher {
|
||||
// tx is really big, pack request with single tx
|
||||
if size >= self.info.soft_limit_byte_size_pooled_transactions_response_on_pack_request {
|
||||
return hashes_from_announcement_iter.collect::<RequestTxHashes>()
|
||||
} else {
|
||||
acc_size_response = size;
|
||||
}
|
||||
acc_size_response = size;
|
||||
}
|
||||
|
||||
let mut surplus_hashes = RequestTxHashes::with_capacity(hashes_from_announcement_len - 1);
|
||||
@ -692,14 +691,9 @@ impl TransactionFetcher {
|
||||
Some(new_announced_hashes)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// stores a new request future for the request
|
||||
self.inflight_requests.push(GetPooledTxRequestFut::new(
|
||||
peer_id,
|
||||
new_announced_hashes,
|
||||
rx,
|
||||
))
|
||||
}
|
||||
// stores a new request future for the request
|
||||
self.inflight_requests.push(GetPooledTxRequestFut::new(peer_id, new_announced_hashes, rx));
|
||||
|
||||
None
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user