diff --git a/iroh-bytes/src/downloader.rs b/iroh-bytes/src/downloader.rs index 804c2501716..9544d7a679a 100644 --- a/iroh-bytes/src/downloader.rs +++ b/iroh-bytes/src/downloader.rs @@ -796,10 +796,7 @@ impl, D: Dialer> Service { } fn next_action_for_download(&self, kind: &DownloadKind) -> HashAction { - let mut candidates = self - .providers - .get_candidates(&kind.hash()) - .peekable(); + let mut candidates = self.providers.get_candidates(&kind.hash()).peekable(); // no candidates: abort. if candidates.peek().is_none() { return HashAction::OutOfProviders; diff --git a/iroh/src/node.rs b/iroh/src/node.rs index 5981b2772af..4eefc86178b 100644 --- a/iroh/src/node.rs +++ b/iroh/src/node.rs @@ -1093,7 +1093,7 @@ impl RpcHandler { let db = self.inner.db.clone(); let hash_and_format = HashAndFormat { hash, format }; let temp_pin = self.inner.db.temp_tag(hash_and_format); - let node_id = peer.node_id.clone(); + let node_id = peer.node_id; self.inner.endpoint.add_node_addr(peer).ok(); // todo: handle err let downloader = self.inner.downloader.clone(); self.inner.rt.spawn_pinned(move || async move {