pub fn move_segments_up(&mut self) {
        if !self.can_move_segments_up() {
            return;
        }

        for i in 0..self.run.len() - 1 {
            if self.selected_segments.contains(&(i + 1)) {
                self.switch_segments(i);
            }
        }

        for segment in &mut self.selected_segments {
            *segment = segment.saturating_sub(1);
        }

        self.times_modified();
        self.fix();
    }
/// Moves all the selected segments up, unless the first segment is
/// selected. The run's information is automatically adjusted properly. The
/// active segment stays the active segment.
Moves all the selected segments up, unless the first segment is
selected. The run's information is automatically adjusted properly. The
active segment stays the active segment.
Moves all the selected segments up unless the first segment is selected . The run ' s information is automatically adjusted properly . The active segment stays the active segment .
pub fn move_segments_up(&mut self) {
        if !self.can_move_segments_up() {
            return;
        }
        for i in 0..self.run.len() - 1 {
            if self.selected_segments.contains(&(i + 1)) {
                self.switch_segments(i);
            }
        }
        for segment in &mut self.selected_segments {
            *segment = segment.saturating_sub(1);
        }
        self.times_modified();
        self.fix();
    }
pub fn move_segments_up ( & mut self ) { if ! self . can_move_segments_up ( ) { return ; } for i in 0 .. self . run . len ( ) - 1 { if self . selected_segments . contains ( & ( i + 1 ) ) { self . switch_segments ( i ) ; } } for segment in & mut self . selected_segments { * segment = segment . saturating_sub ( 1 ) ; } self . times_modified ( ) ; self . fix ( ) ; }
Moves all the selected segments up, unless the first segment is
selected.
Moves all the selected segments up unless the first segment is selected .
&mut self
&mut self