Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc/multistream-select: Cleanup trait bounds and remove unused file #2067

Merged
merged 3 commits into from
May 17, 2021

Conversation

mxinden
Copy link
Member

@mxinden mxinden commented May 6, 2021

Small cleanups found while implementing #2066 namely:

  • Remove unused file error.rs.
  • Remove unnecessary trait bounds on structs.

I: Iterator,
I::Item: AsRef<[u8]>
{
pub struct DialerSelectSeq<R, I: Iterator> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Did a quick exploration whether we could get rid of this trait-bound as well but I don't think it is worth it. Not if we want to keep exporting a named type from multistream-select and I believe switching to impl Trait for dialer_select_proto makes the situation in rust-libp2p actually worse because we'd have more type parameters bubbling up (or would need to start boxing things once we are in libp2p-swarm).

@mxinden
Copy link
Member Author

mxinden commented May 12, 2021

@vmx do you have a couple of minutes to give this pull request a review?

@mxinden mxinden merged commit d9f1c71 into libp2p:master May 17, 2021
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.

3 participants