Skip to content

Commit 5224d11

Browse files
committed
box httpbody
1 parent c9ba1b5 commit 5224d11

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

cli/ops/fetch.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ pub fn op_fetch(
6969

7070
let body = HttpBody::from(res.into_body());
7171
let mut table = state_.lock_resource_table();
72-
let rid = table.add("httpBody", Box::new(StreamResource::HttpBody(body)));
72+
let rid = table.add(
73+
"httpBody",
74+
Box::new(StreamResource::HttpBody(Box::new(body))),
75+
);
7376

7477
let json_res = json!({
7578
"bodyRid": rid,

cli/ops/io.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub enum StreamResource {
8585
TcpStream(tokio::net::TcpStream),
8686
ServerTlsStream(Box<ServerTlsStream<TcpStream>>),
8787
ClientTlsStream(Box<ClientTlsStream<TcpStream>>),
88-
HttpBody(HttpBody),
88+
HttpBody(Box<HttpBody>),
8989
ChildStdin(tokio_process::ChildStdin),
9090
ChildStdout(tokio_process::ChildStdout),
9191
ChildStderr(tokio_process::ChildStderr),

0 commit comments

Comments
 (0)