diff --git a/src/parse_execution.rs b/src/parse_execution.rs index 5f14f692b..141da74c6 100644 --- a/src/parse_execution.rs +++ b/src/parse_execution.rs @@ -1835,7 +1835,7 @@ fn populate_job_from_job_node( if result == EndExecutionReason::ok { // Link up the processes. assert!(!processes.is_empty()); - *j.processes_mut() = processes; + *j.processes_mut() = processes.into_boxed_slice(); } result } diff --git a/src/proc.rs b/src/proc.rs index f743b0f0d..7c9dc7b3b 100644 --- a/src/proc.rs +++ b/src/proc.rs @@ -791,7 +791,7 @@ pub struct Job { command_str: WString, /// All the processes in this job. - pub processes: Vec, + pub processes: Box<[Process]>, // The group containing this job. // This is never cleared. @@ -824,15 +824,13 @@ pub fn command(&self) -> &wstr { &self.command_str } - /// Borrow the job's process list. Only read-only or interior mutability actions may be - /// performed on the processes in the list. + /// Borrow the job's process list. pub fn processes(&self) -> &[Process] { &self.processes } - /// Get mutable access to the job's process list. - /// Only available with a mutable reference `&mut Job`. - pub fn processes_mut(&mut self) -> &mut Vec { + /// Get the mutable list of processes. + pub fn processes_mut(&mut self) -> &mut Box<[Process]> { &mut self.processes }