Skip to content

Commit

Permalink
ducks adds backports and deprecated features
Browse files Browse the repository at this point in the history
I'm attempting to upgrade hyper et al in our project. This is a delicate
business and I want to go slowly. I'm following the migration guide
one crate at a time.

Signed-off-by: Brian L. Troutwine <[email protected]>
  • Loading branch information
blt committed Nov 12, 2024
1 parent 31c9fb6 commit 28b6db2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion integration/ducks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ publish = false
anyhow = "1.0"
bytes = { workspace = true }
entropy = "0.4"
hyper = { version = "0.14", features = ["server"] }
hyper = { version = "0.14", features = ["server", "backports", "deprecated"] }
once_cell = { workspace = true }
shared = { path = "../shared" }
sketches-ddsketch = "0.3"
Expand Down
4 changes: 2 additions & 2 deletions integration/ducks/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use anyhow::Context;
use bytes::BytesMut;
use hyper::{
body,
body::HttpBody,
server::conn::{AddrIncoming, AddrStream},
service::{make_service_fn, service_fn},
Body, Method, Request, StatusCode,
Expand Down Expand Up @@ -127,7 +127,7 @@ impl From<&SocketCounters> for SocketMetrics {
#[tracing::instrument(level = "trace")]
async fn http_req_handler(req: Request<Body>) -> Result<hyper::Response<Body>, hyper::Error> {
let (parts, body) = req.into_parts();
let body = body::to_bytes(body).await?;
let body = body.collect().await?.to_bytes();

{
let metric = HTTP_COUNTERS.get().expect("HTTP_COUNTERS not initialized");
Expand Down

0 comments on commit 28b6db2

Please sign in to comment.