Skip to content

Commit

Permalink
chore: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Frando committed Mar 15, 2024
1 parent 8c08b8e commit 0cf5a38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions iroh-bytes/src/downloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,6 @@ impl<G: Getter<Connection = D::Connection>, D: Dialer> Service<G, D> {
let mut candidates = self
.providers
.get_candidates(&kind.hash())
.into_iter()
.peekable();
// no candidates: abort.
if candidates.peek().is_none() {
Expand Down Expand Up @@ -860,7 +859,7 @@ impl<G: Getter<Connection = D::Connection>, D: Dialer> Service<G, D> {
let subscribers = request_info
.intents
.iter()
.flat_map(|id| self.intents.get(&id))
.flat_map(|id| self.intents.get(id))
.flat_map(|state| state.on_progress.clone());
let progress_sender = self.progress_tracker.create(kind, subscribers);

Expand Down Expand Up @@ -1003,7 +1002,7 @@ impl ProviderMap {
self.remove_hash(hash);
}
}
if let Some(hashes) = self.node_hash.get_mut(&node) {
if let Some(hashes) = self.node_hash.get_mut(node) {
hashes.remove(hash);
if hashes.is_empty() {
self.remove_node(node);
Expand Down
2 changes: 1 addition & 1 deletion iroh-bytes/src/get/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl TransferState {
fn get_blob_mut(&mut self, blob_id: &BlobId) -> Option<&mut BlobState> {
match blob_id {
BlobId::Root => Some(&mut self.root),
BlobId::Child(id) => self.children.get_mut(&id),
BlobId::Child(id) => self.children.get_mut(id),
}
}

Expand Down

0 comments on commit 0cf5a38

Please sign in to comment.