/// Cleans up the `procedure` and returns true if it has completed.
Cleans up the `procedure` and returns true if it has completed.
Cleans up the ` procedure ` and returns true if it has completed .
fn check_and_cleanup_procedure(&mut self, procedure: &ProcedureMarker) -> bool {
        let is_terminated = self.procedures.get(procedure).map_or(false, |p| p.is_terminated());
        if is_terminated {
            let mut finished_procedure =
                self.procedures.remove(procedure).expect("just checked existence");
            // Save the inspect data associated with the finished procedure.
            if let Some(inspect_node) = finished_procedure.take_inspect_node() {
                self.inspect.record_procedure(inspect_node);
            }
            // Special case of the SLCI Procedure - once this is complete, the channel is
            // considered initialized.
            if *procedure == ProcedureMarker::SlcInitialization {
                self.set_initialized();
            }
        }
        is_terminated
    }
fn check_and_cleanup_procedure ( & mut self , procedure : & ProcedureMarker ) -> bool { let is_terminated = self . procedures . get ( procedure ) . map_or ( false , | p | p . is_terminated ( ) ) ; if is_terminated { let mut finished_procedure = self . procedures . remove ( procedure ) . expect ( " " ) ; // Save the inspect data associated with the finished procedure. if let Some ( inspect_node ) = finished_procedure . take_inspect_node ( ) { self . inspect . record_procedure ( inspect_node ) ; } // Special case of the SLCI Procedure - once this is complete, the channel is // considered initialized. if * procedure == ProcedureMarker :: SlcInitialization { self . set_initialized ( ) ; } } is_terminated }
Cleans up the `procedure` and returns true if it has completed.
Cleans up the ` procedure ` and returns true if it has completed .
&mut self
procedure
&ProcedureMarker