Skip to content

Commit

Permalink
chore(lib): update to 2021 edition
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Jan 24, 2024
1 parent 7a0a640 commit 7177770
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "MIT"
authors = ["Sean McArthur <sean@seanmonstar.com>"]
keywords = ["http", "hyper", "hyperium"]
categories = ["network-programming", "web-programming::http-client", "web-programming::http-server"]
edition = "2018"
edition = "2021"
rust-version = "1.63" # keep in sync with MSRV.md dev doc

include = [
Expand All @@ -23,7 +23,6 @@ include = [
bytes = "1"
http = "1"
http-body = "1"
pin-project-lite = "0.2.4"
tokio = { version = "1", features = ["sync"] }

# Optional
Expand All @@ -36,6 +35,7 @@ httparse = { version = "1.8", optional = true }
httpdate = { version = "1.0", optional = true }
itoa = { version = "1", optional = true }
libc = { version = "0.2", optional = true }
pin-project-lite = { version = "0.2.4", optional = true }
tracing = { version = "0.1", default-features = false, features = ["std"], optional = true }
want = { version = "0.3", optional = true }

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

# Client/Server
client = ["dep:want"]
server = ["dep:httpdate"]
client = ["dep:want", "dep:pin-project-lite"]
server = ["dep:httpdate", "dep:pin-project-lite"]

# C-API support (currently unstable (no semver))
ffi = ["dep:libc", "dep:http-body-util"]
Expand Down
1 change: 1 addition & 0 deletions benches/end_to_end.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ fn spawn_server(rt: &tokio::runtime::Runtime, opts: &Opts) -> SocketAddr {
let body = opts.response_body;
let opts = opts.clone();
rt.spawn(async move {
let _ = &opts;
while let Ok((sock, _)) = listener.accept().await {
let io = support::TokioIo::new(sock);
if opts.http2 {
Expand Down
1 change: 1 addition & 0 deletions src/ffi/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ ffi_fn! {
let userdata = UserDataPointer(userdata);

Box::into_raw(hyper_task::boxed(async move {
let _ = &userdata;
while let Some(item) = body.0.frame().await {
let frame = item?;
if let Ok(chunk) = frame.into_data() {
Expand Down

0 comments on commit 7177770

Please sign in to comment.