File tree Expand file tree Collapse file tree 3 files changed +6
-14
lines changed
Expand file tree Collapse file tree 3 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -116,8 +116,8 @@ where
116116 . await
117117 . map_err ( GraphQLRequestError :: BodyHyper ) ?;
118118
119- let input = String :: from_utf8 ( chunk . to_bytes ( ) . iter ( ) . cloned ( ) . collect ( ) )
120- . map_err ( GraphQLRequestError :: BodyUtf8 ) ?;
119+ let input =
120+ String :: from_utf8 ( chunk . to_bytes ( ) . into ( ) ) . map_err ( GraphQLRequestError :: BodyUtf8 ) ?;
121121
122122 serde_json:: from_str :: < GraphQLBatchRequest < S > > ( & input)
123123 . map_err ( GraphQLRequestError :: BodyJSONError )
@@ -135,8 +135,8 @@ where
135135 . await
136136 . map_err ( GraphQLRequestError :: BodyHyper ) ?;
137137
138- let query = String :: from_utf8 ( chunk . to_bytes ( ) . iter ( ) . cloned ( ) . collect ( ) )
139- . map_err ( GraphQLRequestError :: BodyUtf8 ) ?;
138+ let query =
139+ String :: from_utf8 ( chunk . to_bytes ( ) . into ( ) ) . map_err ( GraphQLRequestError :: BodyUtf8 ) ?;
140140
141141 Ok ( GraphQLBatchRequest :: Single ( GraphQLRequest :: new (
142142 query, None , None ,
Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ http-body-util = "0.1.2"
4747[dev-dependencies ]
4848async-stream = " 0.3"
4949env_logger = " 0.11"
50- futures = " 0.3.22"
5150http-body-util = " 0.1.2"
5251itertools = " 0.14"
5352juniper = { version = " 0.16" , path = " ../juniper" , features = [" expose-test-schema" ] }
Original file line number Diff line number Diff line change 22
33#![ expect( unused_crate_dependencies, reason = "integration tests" ) ]
44
5- use futures:: TryStreamExt as _;
65use http_body_util:: BodyExt as _;
76use itertools:: Itertools as _;
87use juniper:: {
@@ -123,14 +122,8 @@ async fn into_test_response(resp: reply::Response) -> TestResponse {
123122 } )
124123 . unwrap_or_default ( ) ;
125124
126- let body = String :: from_utf8 (
127- body. into_data_stream ( )
128- . map_ok ( |bytes| bytes. to_vec ( ) )
129- . try_concat ( )
130- . await
131- . unwrap ( ) ,
132- )
133- . unwrap_or_else ( |e| panic ! ( "not UTF-8 body: {e}" ) ) ;
125+ let body = String :: from_utf8 ( body. collect ( ) . await . unwrap ( ) . to_bytes ( ) . into ( ) )
126+ . unwrap_or_else ( |e| panic ! ( "not UTF-8 body: {e}" ) ) ;
134127
135128 TestResponse {
136129 status_code,
You can’t perform that action at this time.
0 commit comments