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

Tcp refinements #404

Merged
merged 10 commits into from
Aug 9, 2018
Merged

Tcp refinements #404

merged 10 commits into from
Aug 9, 2018

Conversation

tomaka
Copy link
Member

@tomaka tomaka commented Aug 8, 2018

Beginning of an effort to remove boxes from the crate. cc #369

You can review commit by commit, especially as there's a cargo fmt in the middle of the stack.

@ghost ghost assigned tomaka Aug 8, 2018
@ghost ghost added the in progress label Aug 8, 2018
Ok((Box::new(future), new_addr))
let inner = listener
.map_err(Some)
.map(|l| l.incoming().sleep_on_error(Duration::from_secs(1)));
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 updated to use TcpConfig::sleep_on_error.

let proto2 = match iter.next() {
Some(v) => v,
None => return Err(()),
};
Copy link
Contributor

Choose a reason for hiding this comment

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

How about:

let proto1 = iter.next().ok_or(())?;
let proto2 = iter.next().ok_or(())?;

@tomaka tomaka merged commit 486a969 into libp2p:master Aug 9, 2018
@ghost ghost removed the in progress label Aug 9, 2018
@tomaka tomaka deleted the tcp-refinements branch August 9, 2018 12:04
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.

2 participants