pub fn select_range(&mut self, index: usize) {
        let active = self.active_segment_index();
        let range = if index < active {
            index + 1..active
        } else {
            active + 1..index
        };
        for i in range {
            if !self.selected_segments.contains(&i) {
                self.selected_segments.push(i);
            }
        }
        self.select_additionally(index);
    }
/// Select all segments from the currently active segment to the segment at
/// the index provided. The segment at the index provided becomes the new
/// active segment.
///
/// # Panics
///
/// This panics if the index of the segment provided is out of bounds.
Select all segments from the currently active segment to the segment at
the index provided. The segment at the index provided becomes the new
active segment.
Select all segments from the currently active segment to the segment at the index provided . The segment at the index provided becomes the new active segment .
pub fn select_range(&mut self, index: usize) {
        let active = self.active_segment_index();
        let range = if index < active {
            index + 1..active
        } else {
            active + 1..index
        };
        for i in range {
            if !self.selected_segments.contains(&i) {
                self.selected_segments.push(i);
            }
        }
        self.select_additionally(index);
    }
pub fn select_range ( & mut self , index : usize ) { let active = self . active_segment_index ( ) ; let range = if index < active { index + 1 .. active } else { active + 1 .. index } ; for i in range { if ! self . selected_segments . contains ( & i ) { self . selected_segments . push ( i ) ; } } self . select_additionally ( index ) ; }
Select all segments from the currently active segment to the segment at
the index provided.
Select all segments from the currently active segment to the segment at the index provided .
&mut self
index
usize
&mut self
index
usize
panics
This panics if the index of the segment provided is out of bounds.
This panics if the index of the segment provided is out of bounds .