diff options
author | Alex Auvolat <alex@adnab.me> | 2024-02-05 14:44:12 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-02-05 14:44:12 +0100 |
commit | 6e69a1fffc715c752a399750c1e26aa46683dbb2 (patch) | |
tree | d1539c6107372f14aa6ca09255977df69411a553 /src/garage/tests/k2v/simple.rs | |
parent | 6e4229e29c1ee3e0b7f3511f80b6108e3beb1efd (diff) | |
download | garage-6e69a1fffc715c752a399750c1e26aa46683dbb2.tar.gz garage-6e69a1fffc715c752a399750c1e26aa46683dbb2.zip |
[dep-upgrade-202402] prepare migration to http/hyper 1.0
Diffstat (limited to 'src/garage/tests/k2v/simple.rs')
-rw-r--r-- | src/garage/tests/k2v/simple.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/garage/tests/k2v/simple.rs b/src/garage/tests/k2v/simple.rs index 465fc24d..a1d5008b 100644 --- a/src/garage/tests/k2v/simple.rs +++ b/src/garage/tests/k2v/simple.rs @@ -1,6 +1,6 @@ use crate::common; -use hyper::{Method, StatusCode}; +use hyper::{body::HttpBody, Method, StatusCode}; #[tokio::test] async fn test_simple() { @@ -32,9 +32,6 @@ async fn test_simple() { .unwrap(); assert_eq!(res2.status(), StatusCode::OK); - let res2_body = hyper::body::to_bytes(res2.into_body()) - .await - .unwrap() - .to_vec(); - assert_eq!(res2_body, b"Hello, world!"); + let res2_body = res2.into_body().collect().await.unwrap().to_bytes(); + assert_eq!(res2_body, b"Hello, world!"[..]); } |