Skip to content

Commit be25473

Browse files
committed
chore(lib): update to 2021 edition
1 parent 7a0a640 commit be25473

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ license = "MIT"
1010
authors = ["Sean McArthur <[email protected]>"]
1111
keywords = ["http", "hyper", "hyperium"]
1212
categories = ["network-programming", "web-programming::http-client", "web-programming::http-server"]
13-
edition = "2018"
13+
edition = "2021"
1414
rust-version = "1.63" # keep in sync with MSRV.md dev doc
1515

1616
include = [
@@ -23,7 +23,6 @@ include = [
2323
bytes = "1"
2424
http = "1"
2525
http-body = "1"
26-
pin-project-lite = "0.2.4"
2726
tokio = { version = "1", features = ["sync"] }
2827

2928
# Optional
@@ -36,6 +35,7 @@ httparse = { version = "1.8", optional = true }
3635
httpdate = { version = "1.0", optional = true }
3736
itoa = { version = "1", optional = true }
3837
libc = { version = "0.2", optional = true }
38+
pin-project-lite = { version = "0.2.4", optional = true }
3939
tracing = { version = "0.1", default-features = false, features = ["std"], optional = true }
4040
want = { version = "0.3", optional = true }
4141

@@ -80,8 +80,8 @@ http1 = ["dep:futures-channel", "dep:futures-util", "dep:httparse", "dep:itoa"]
8080
http2 = ["dep:futures-channel", "dep:futures-util", "dep:h2"]
8181

8282
# Client/Server
83-
client = ["dep:want"]
84-
server = ["dep:httpdate"]
83+
client = ["dep:want", "dep:pin-project-lite"]
84+
server = ["dep:httpdate", "dep:pin-project-lite"]
8585

8686
# C-API support (currently unstable (no semver))
8787
ffi = ["dep:libc", "dep:http-body-util"]

benches/end_to_end.rs

+1
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ fn spawn_server(rt: &tokio::runtime::Runtime, opts: &Opts) -> SocketAddr {
413413
let body = opts.response_body;
414414
let opts = opts.clone();
415415
rt.spawn(async move {
416+
let _ = &opts;
416417
while let Ok((sock, _)) = listener.accept().await {
417418
let io = support::TokioIo::new(sock);
418419
if opts.http2 {

src/ffi/body.rs

+1
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ ffi_fn! {
150150
let userdata = UserDataPointer(userdata);
151151

152152
Box::into_raw(hyper_task::boxed(async move {
153+
let _ = &userdata;
153154
while let Some(item) = body.0.frame().await {
154155
let frame = item?;
155156
if let Ok(chunk) = frame.into_data() {

0 commit comments

Comments
 (0)