-
Notifications
You must be signed in to change notification settings - Fork 5
chore: slim the futures facade dependency #663
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -294,8 +294,7 @@ async fn send_peer_info( | |
| request: PeerInfo, | ||
| timeout: Duration, | ||
| ) -> Result<(Stream, PeerInfo), Failure> { | ||
| let send = protocol.send_peer_info(stream, &request); | ||
| futures::pin_mut!(send); | ||
| let send = std::pin::pin!(protocol.send_peer_info(stream, &request)); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No The two sites that poll in a loop — |
||
|
|
||
| match future::select(send, Delay::new(timeout)).await { | ||
| future::Either::Left((Ok((stream, response)), _)) => Ok((stream, response)), | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why inline rather than keep
BoxFuture. This alias was the only thingcoreusedfuturesfor, so spelling it out drops the dependency from the workspace's most-depended-on crate.app'snode/wire.rsalready defines aSyncBoxFuturealias this way.