Skip to content

Commit

Permalink
shim: fix-ci
Browse files Browse the repository at this point in the history
feat: WasmEdge lib 0.13.5

Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
  • Loading branch information
Burning1020 committed Jul 22, 2024
1 parent 7b70906 commit b121f1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions shim/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,8 @@ impl VsockIO {
}
Err(other!("timeout connect to port {}", self.port))
}
}

impl ToString for VsockIO {
fn to_string(&self) -> String {
fn convert_to_string(&self) -> String {
if self.sock_path.is_empty() {
String::new()
} else {
Expand Down Expand Up @@ -336,15 +334,15 @@ impl ContainerIoTransport for VSockTransport {
}

fn container_in(&self) -> String {
self.stdin.clone().unwrap_or_default().to_string()
self.stdin.clone().unwrap_or_default().convert_to_string()
}

fn container_out(&self) -> String {
self.stdout.clone().unwrap_or_default().to_string()
self.stdout.clone().unwrap_or_default().convert_to_string()
}

fn container_err(&self) -> String {
self.stderr.clone().unwrap_or_default().to_string()
self.stderr.clone().unwrap_or_default().convert_to_string()
}

async fn new_task_client(address: &str) -> Result<TaskClient> {
Expand Down
2 changes: 1 addition & 1 deletion shim/src/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ where
req_new.stderr = shim_io.container_err();

if !prepare_res.bundle.is_empty() {
req_new.bundle = prepare_res.bundle.clone();
req_new.bundle.clone_from(&prepare_res.bundle);
}

let res = self.task.create(ctx, req_new).await?;
Expand Down

0 comments on commit b121f1f

Please sign in to comment.