fix some escapes from #237/#238 due to xous-rs being on crates.io

This commit is contained in:
bunnie 2022-10-13 03:29:46 +08:00
parent db7d190270
commit 84bdfa1d2f
2 changed files with 10 additions and 10 deletions

View file

@ -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) {

View file

@ -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]
}
}