Skip to content

Conversation

alexcrichton
Copy link
Contributor

I've always regretted a little bit that we've got thread::Builder in the
standard library because it's a bummer to import the type as use std::thread::Builder, so remembering that I'm hoping we can make the import of
the HTTP request/response builders a little nicer through just

use http::RequestBuilder;

This should only rarely be needed anyway as it's more likely to be a temporary
created through Request::builder, but if you import it I'd at least think this
is a bit nicer!

I've always regretted a little bit that we've got `thread::Builder` in the
standard library because it's a bummer to import the type as `use
std::thread::Builder`, so remembering that I'm hoping we can make the import of
the HTTP request/response builders a little nicer through just

    use http::RequestBuilder;

This should only rarely be needed anyway as it's more likely to be a temporary
created through `Request::builder`, but if you import it I'd at least think this
is a bit nicer!
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.

I hope that we can make most of the modules private soon, once we can hang the constants off the type instead, so +1.

@alexcrichton
Copy link
Contributor Author

Whoa, we can actually almost do that! As of the next release this'll work:

impl Version {
    pub const HTTP_11: Version = ...;
}

Sounds like some excellent 1.0 cleanup!

@alexcrichton alexcrichton merged commit d12ea85 into hyperium:master Jul 29, 2017
@alexcrichton alexcrichton deleted the rename-builders branch July 29, 2017 02:10
@carllerche carllerche mentioned this pull request Jul 29, 2017
@carllerche
Copy link
Collaborator

Please do not merge API changes w/o giving the opportunity for comments.

@carllerche
Copy link
Collaborator

I am currently 👎 on this change, but I opened a separate issue to discuss: #69.

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