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

Document the typical value for an io param #2568

Closed
wants to merge 2 commits into from
Closed

Conversation

jsha
Copy link
Contributor

@jsha jsha commented Jun 3, 2021

Per rust-lang/rust#84824, it can be hard to figure out
from the trait bounds what types meet those bounds.

Per rust-lang/rust#84824, it can be hard to figure out
from the trait bounds what types meet those bounds.
Copy link
Member

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

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

Thanks for the suggestion!

@@ -87,7 +87,8 @@ where
H2(#[pin] proto::h2::ClientTask<B>, PhantomData<fn(T)>),
}

/// Returns a handshake future over some IO.
/// Returns a handshake future over some IO. The io parameter will usually be a
/// [tokio::net::TcpStream](https://docs.rs/tokio/1.6.1/tokio/net/struct.TcpStream.html).
Copy link
Member

Choose a reason for hiding this comment

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

I wonder, so as to not encode the version directly into the source, can we just point at (tokio::net::TcpStream)? Also, I'd put the second sentence in a new line / new paragraph.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! I tried just pointing at tokio::net::TcpStream with intradoc links, but it didn't work because that's behind a feature flag. Instead I replaced 1.6.1 with latest

@seanmonstar
Copy link
Member

As part of hyper 1.0, we're trying to de-couple the Tokio preference from hyper directly, but I do think we should have more guides telling people the most likely way they will do a thing.

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