mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 21:41:12 +00:00
Some fixes the compiler pointed out to me (#4482)
* Fix bug in availability-distribution. Old fetches would not get cancelled as intended. * Fix a few more warnings.
This commit is contained in:
@@ -203,7 +203,9 @@ impl FetchTask {
|
||||
/// Remove leaves and cancel the task, if it was the last one and the task has still been
|
||||
/// fetching.
|
||||
pub fn remove_leaves(&mut self, leaves: &HashSet<Hash>) {
|
||||
self.live_in.difference(leaves);
|
||||
for leaf in leaves {
|
||||
self.live_in.remove(leaf);
|
||||
}
|
||||
if self.live_in.is_empty() && !self.is_finished() {
|
||||
self.state = FetchedState::Canceled
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user