Skip to content

Documentation: HttpConnector requires the "tcp" feature #2374

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

Closed
tux3 opened this issue Dec 23, 2020 · 3 comments
Closed

Documentation: HttpConnector requires the "tcp" feature #2374

tux3 opened this issue Dec 23, 2020 · 3 comments
Labels
A-docs Area: documentation. E-easy Effort: easy. A task that would be a great starting point for a new contributor.

Comments

@tux3
Copy link

tux3 commented Dec 23, 2020

The docs.rs documentation for HttpConnector with hyper 0.14.1 says:

This is supported on crate feature client and (crate features http1 or http2) only.

As I understand it this seems based on of the following in hyper's lib.rs:

cfg_feature! {
    #![all(feature = "client", any(feature = "http1", feature = "http2"))]

    pub mod client;
    pub use crate::client::Client;
}

But it seems the HttpConnector struct also depends on the tcp feature.

#[cfg(feature = "tcp")]
pub use self::connect::HttpConnector;

I'm not sure how much control you have over this, but would it be possible to fix the doc to show the extra required feature? =)

@seanmonstar
Copy link
Member

True, this could be fixed by changing it to use the cfg_feature macro instead, like:

cfg_feature {
    #![feature = "tcp"]
    pub use self::connect::HttpConnector;
}

@seanmonstar seanmonstar added A-docs Area: documentation. E-easy Effort: easy. A task that would be a great starting point for a new contributor. labels Dec 23, 2020
@SkamDart
Copy link

Looks like I need to fix the commit message but what is the right way to test this?
I can't quite figure out the incantation that docs.rs uses to generate docs...

@seanmonstar
Copy link
Member

Fixed in #2377

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation. E-easy Effort: easy. A task that would be a great starting point for a new contributor.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants