Skip to content

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