fix errors is the test module from PR#238

This commit is contained in:
bunnie 2022-10-13 04:01:43 +08:00
parent 51752aac9d
commit 64b942f3b4

View file

@ -193,10 +193,10 @@ impl From<&ProcessStartup> for [usize; 7] {
impl From<&ProcessInit> for [usize; 7] {
fn from(init: &ProcessInit) -> [usize; 7] {
[
u32::from_le_bytes(self.key.0[0..4].try_into().unwrap()) as _,
u32::from_le_bytes(self.key.0[4..8].try_into().unwrap()) as _,
u32::from_le_bytes(self.key.0[8..12].try_into().unwrap()) as _,
u32::from_le_bytes(self.key.0[12..16].try_into().unwrap()) as _,
u32::from_le_bytes(init.key.0[0..4].try_into().unwrap()) as _,
u32::from_le_bytes(init.key.0[4..8].try_into().unwrap()) as _,
u32::from_le_bytes(init.key.0[8..12].try_into().unwrap()) as _,
u32::from_le_bytes(init.key.0[12..16].try_into().unwrap()) as _,
0,
0,
0,
@ -246,7 +246,7 @@ pub fn create_process_post(
let server_env = format!("{}", xous_address());
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) {