Skip to content

Commit 7678bd2

Browse files
fix Command glue
1 parent 5311a22 commit 7678bd2

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

crates/roc_host/src/lib.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -631,24 +631,16 @@ pub extern "C" fn roc_fx_tcp_write(stream: RocBox<()>, msg: &RocList<u8>) -> Roc
631631

632632
#[no_mangle]
633633
pub extern "C" fn roc_fx_command_status(
634-
boxed_roc_cmd: RocBox<roc_command::Command>,
634+
roc_cmd: &roc_command::Command,
635635
) -> RocResult<i32, roc_io_error::IOErr> {
636-
let roc_cmd = boxed_roc_cmd.into_inner();
637-
638-
dbg!(&roc_cmd);
639-
640-
roc_command::command_status(&roc_cmd)
636+
roc_command::command_status(roc_cmd)
641637
}
642638

643639
#[no_mangle]
644640
pub extern "C" fn roc_fx_command_output(
645-
boxed_roc_cmd: RocBox<roc_command::Command>,
641+
roc_cmd: &roc_command::Command,
646642
) -> roc_command::OutputFromHost {
647-
let roc_cmd = boxed_roc_cmd.into_inner();
648-
649-
dbg!(&roc_cmd);
650-
651-
roc_command::command_output(&roc_cmd)
643+
roc_command::command_output(roc_cmd)
652644
}
653645

654646
#[no_mangle]

platform/Cmd.roc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ clear_envs = \@Cmd cmd ->
107107
##
108108
output! : Cmd => Output
109109
output! = \@Cmd cmd ->
110-
Host.command_output! (Box.box cmd)
110+
Host.command_output! cmd
111111
|> InternalCmd.from_host_output
112112

113113
## Execute command and inherit stdin, stdout and stderr from parent
114114
##
115115
status! : Cmd => Result I32 [CmdStatusErr InternalIOErr.IOErr]
116116
status! = \@Cmd cmd ->
117-
Host.command_status! (Box.box cmd)
117+
Host.command_status! cmd
118118
|> Result.mapErr InternalIOErr.handle_err
119119
|> Result.mapErr CmdStatusErr
120120

platform/Host.roc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ import InternalPath
5353
import InternalIOErr
5454

5555
# COMMAND
56-
command_status! : Box InternalCmd.Command => Result I32 InternalIOErr.IOErrFromHost
57-
command_output! : Box InternalCmd.Command => InternalCmd.OutputFromHost
56+
command_status! : InternalCmd.Command => Result I32 InternalIOErr.IOErrFromHost
57+
command_output! : InternalCmd.Command => InternalCmd.OutputFromHost
5858

5959
# FILE
6060
file_write_bytes! : List U8, List U8 => Result {} InternalIOErr.IOErrFromHost

0 commit comments

Comments
 (0)