From 84bdfa1d2fa99c81730cdc91f7c2a98b84c48d03 Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 13 Oct 2022 03:29:46 +0800 Subject: [PATCH] fix some escapes from #237/#238 due to xous-rs being on crates.io --- xous-rs/src/arch/hosted/process.rs | 2 +- xous-rs/src/arch/riscv/process.rs | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/xous-rs/src/arch/hosted/process.rs b/xous-rs/src/arch/hosted/process.rs index 01d21eb29..a6ff8b252 100644 --- a/xous-rs/src/arch/hosted/process.rs +++ b/xous-rs/src/arch/hosted/process.rs @@ -145,7 +145,7 @@ pub fn create_process_post( let server_env = format!("{}", CHILD_PROCESS_ADDRESS.lock().unwrap()); let pid_env = format!("{}", startup.pid); let process_name_env = args.name.to_string(); - let process_key_env: String = init.key.into(); + let process_key_env: String = format!("{}", init.key); let (shell, args) = if cfg!(windows) { ("cmd", ["/C", &args.command]) } else if cfg!(unix) { diff --git a/xous-rs/src/arch/riscv/process.rs b/xous-rs/src/arch/riscv/process.rs index 0d8769e00..1131933da 100644 --- a/xous-rs/src/arch/riscv/process.rs +++ b/xous-rs/src/arch/riscv/process.rs @@ -53,14 +53,14 @@ pub struct ProcessInit { } impl From<&ProcessInit> for [usize; 7] { - fn into(self) -> [usize; 7] { + fn from(src: &ProcessInit) -> [usize; 7] { [ - self.stack.addr.get(), - self.stack.size.get(), - self.text.addr.get(), - self.text.size.get(), - self.text_destination.get(), - self.start.get(), + src.stack.addr.get(), + src.stack.size.get(), + src.text.addr.get(), + src.text.size.get(), + src.text_destination.get(), + src.start.get(), 0, ] } @@ -122,8 +122,8 @@ impl From<[usize; 8]> for ProcessStartup { } impl From<&ProcessStartup> for [usize; 7] { - fn into(self) -> [usize; 7] { - [self.pid.get() as _, self.connection as _, 0, 0, 0, 0, 0] + fn from(src: &ProcessStartup) -> [usize; 7] { + [src.pid.get() as _, src.connection as _, 0, 0, 0, 0, 0] } }