pub fn insert_segment_below(&mut self) {
        let active_segment = self.active_segment_index();
        let next_segment = active_segment + 1;

        let mut segment = Segment::new("");
        if next_segment < self.run.len() {
            self.run.import_best_segment(next_segment);
        }

        let max_index = self.run.max_attempt_history_index().unwrap_or(0);
        let min_index = self.run.min_segment_history_index().unwrap();
        for x in min_index..=max_index {
            segment.segment_history_mut().insert(x, Default::default());
        }
        self.run.segments_mut().insert(next_segment, segment);

        self.select_only(next_segment);

        self.times_modified();
        self.fix();
    }
/// Inserts a new empty segment below the active segment and adjusts the
/// Run's history information accordingly. The newly created segment is then
/// the only selected segment and also the active segment.
Inserts a new empty segment below the active segment and adjusts the
Run's history information accordingly. The newly created segment is then
the only selected segment and also the active segment.
Inserts a new empty segment below the active segment and adjusts the Run ' s history information accordingly . The newly created segment is then the only selected segment and also the active segment .
pub fn insert_segment_below(&mut self) {
        let active_segment = self.active_segment_index();
        let next_segment = active_segment + 1;
        let mut segment = Segment::new("");
        if next_segment < self.run.len() {
            self.run.import_best_segment(next_segment);
        }
        let max_index = self.run.max_attempt_history_index().unwrap_or(0);
        let min_index = self.run.min_segment_history_index().unwrap();
        for x in min_index..=max_index {
            segment.segment_history_mut().insert(x, Default::default());
        }
        self.run.segments_mut().insert(next_segment, segment);
        self.select_only(next_segment);
        self.times_modified();
        self.fix();
    }
pub fn insert_segment_below ( & mut self ) { let active_segment = self . active_segment_index ( ) ; let next_segment = active_segment + 1 ; let mut segment = Segment :: new ( " " ) ; if next_segment < self . run . len ( ) { self . run . import_best_segment ( next_segment ) ; } let max_index = self . run . max_attempt_history_index ( ) . unwrap_or ( 0 ) ; let min_index = self . run . min_segment_history_index ( ) . unwrap ( ) ; for x in min_index ..= max_index { segment . segment_history_mut ( ) . insert ( x , Default :: default ( ) ) ; } self . run . segments_mut ( ) . insert ( next_segment , segment ) ; self . select_only ( next_segment ) ; self . times_modified ( ) ; self . fix ( ) ; }
Inserts a new empty segment below the active segment and adjusts the
Run's history information accordingly.
Inserts a new empty segment below the active segment and adjusts the Run ' s history information accordingly .
&mut self
&mut self