pub fn insert_segment_above(&mut self) {
        let active_segment = self.active_segment_index();

        let mut segment = Segment::new("");
        self.run.import_best_segment(active_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(active_segment, segment);

        self.select_only(active_segment);

        self.times_modified();
        self.fix();
    }
/// Inserts a new empty segment above 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 above 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 above 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_above(&mut self) {
        let active_segment = self.active_segment_index();
        let mut segment = Segment::new("");
        self.run.import_best_segment(active_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(active_segment, segment);
        self.select_only(active_segment);
        self.times_modified();
        self.fix();
    }
pub fn insert_segment_above ( & mut self ) { let active_segment = self . active_segment_index ( ) ; let mut segment = Segment :: new ( " " ) ; self . run . import_best_segment ( active_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 ( active_segment , segment ) ; self . select_only ( active_segment ) ; self . times_modified ( ) ; self . fix ( ) ; }
Inserts a new empty segment above the active segment and adjusts the
Run's history information accordingly.
Inserts a new empty segment above the active segment and adjusts the Run ' s history information accordingly .
&mut self
&mut self