Skip to content

Conversation

@dignifiedquire
Copy link
Contributor

No description provided.

@github-actions
Copy link

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3575/docs/iroh/

Last updated: 2025-10-23T16:26:55Z

@github-actions
Copy link

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: 1701c1d

@dignifiedquire dignifiedquire added this pull request to the merge queue Oct 23, 2025
Merged via the queue into main with commit 45e1f48 Oct 23, 2025
28 of 29 checks passed
Comment on lines +116 to +120
pub fn extend(&self, other: &RelayMap) {
let mut a = self.relays.write().expect("poisoned");
let b = other.relays.read().expect("poisoned");
a.extend(b.iter().map(|(a, b)| (a.clone(), b.clone())));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be impl Extend for RelayMap IMO.

Also: Why is there panicing expect inside of this function? This is not what a user expects from the documentation of the whole type!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After some discussion on your discord tho, using the Extend trait does not seem possible because of how the types are designed here.
And the std RwLock cannot easily be replaced by a tokio one 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants