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

Update http dep to 0.2.7 #3372

Merged
merged 1 commit into from
Oct 23, 2023
Merged

Update http dep to 0.2.7 #3372

merged 1 commit into from
Oct 23, 2023

Conversation

jsha
Copy link
Contributor

@jsha jsha commented Oct 23, 2023

This is required to use HeaderName::from_static in a const.

Without this, I was getting the following error:

RUSTFLAGS="--cfg hyper_unstable_ffi" cargo rustc --features client,http1,http2,ffi --crate-type cdylib
...
error[E0015]: cannot call non-const fn `http::header::HeaderName::from_static` in constants
  --> src/proto/h2/mod.rs:39:5
   |
39 |     HeaderName::from_static("keep-alive"),
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants

error[E0015]: cannot call non-const fn `http::header::HeaderName::from_static` in constants
  --> src/proto/h2/mod.rs:40:5
   |
40 |     HeaderName::from_static("proxy-connection"),
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants

I suspect part of the reason I was getting this error is that I had a development directory sitting around from months ago, meaning the Cargo.lock was pinning an older version of http.

https://github.com/hyperium/http/compare/v0.2.6..v0.2.7

This is required to use HeaderName::from_static in a const
@seanmonstar seanmonstar enabled auto-merge (squash) October 23, 2023 20:07
@seanmonstar seanmonstar merged commit 04f0981 into hyperium:master Oct 23, 2023
19 checks passed
0xE282B0 pushed a commit to 0xE282B0/hyper that referenced this pull request Jan 12, 2024
This is required to use HeaderName::from_static in a const
0xE282B0 pushed a commit to 0xE282B0/hyper that referenced this pull request Jan 16, 2024
This is required to use HeaderName::from_static in a const

Signed-off-by: Sven Pfennig <[email protected]>
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