Skip to content

Commit f1486d4

Browse files
committed
fix: Resolve compilation errors by correcting imports and method calls
1 parent a36eadb commit f1486d4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

integration/ducks/src/main.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(dead_code)]
12
//! Ducks is an integration testing target for lading.
23
//!
34
//! Ducks exists to enable correctness testing on lading. Any high-level
@@ -15,9 +16,9 @@
1516
1617
use anyhow::Context;
1718
use bytes::BytesMut;
18-
use hyper::{service::service_fn, Method, Request, Response, StatusCode, Body};
19-
use tonic::transport::Server as HyperServer;
20-
use http_body_util::BodyExt;
19+
use hyper::{service::service_fn, Method, Request, Response, StatusCode};
20+
use hyper::body::{Body, to_bytes};
21+
use hyper::Server as HyperServer;
2122
use once_cell::sync::OnceCell;
2223
use shared::{
2324
integration_api::{
@@ -124,7 +125,7 @@ impl From<&SocketCounters> for SocketMetrics {
124125
#[tracing::instrument(level = "trace")]
125126
async fn http_req_handler(req: Request<BoxBody>) -> Result<Response<BoxBody>, hyper::Error> {
126127
let (parts, body) = req.into_parts();
127-
let body_bytes = body.to_bytes().await?;
128+
let body_bytes = to_bytes(body).await?;
128129

129130
{
130131
let metric = HTTP_COUNTERS.get().expect("HTTP_COUNTERS not initialized");

0 commit comments

Comments
 (0)