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

hyper-util Client examples are wrong #3456

Closed
frederikhors opened this issue Dec 2, 2023 · 1 comment
Closed

hyper-util Client examples are wrong #3456

frederikhors opened this issue Dec 2, 2023 · 1 comment
Labels
C-bug Category: bug. Something is wrong. This is bad!

Comments

@frederikhors
Copy link

All (or many) examples in this page are wrong, at least I think: https://docs.rs/hyper-util/latest/hyper_util/client/legacy/struct.Client.html.

E.g.:

let client = Client::new();

new() doesn't exist anymore (and I don't know what to use).

@frederikhors frederikhors added the C-bug Category: bug. Something is wrong. This is bad! label Dec 2, 2023
@dswij
Copy link
Member

dswij commented Dec 2, 2023

The docs should be fixed by hyperium/hyper-util#65, but the changes haven't been reflected yet.

Basically, you need to do something like:

let client: Client<_, Full<Bytes>> = Client::builder(TokioExecutor::new()).build_http();

@seanmonstar seanmonstar closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug. Something is wrong. This is bad!
Projects
None yet
Development

No branches or pull requests

3 participants