pub fn unselect(&mut self, index: usize) {
        self.selected_segments.retain(|&i| i != index);
        if self.selected_segments.is_empty() {
            self.selected_segments.push(index);
        }
    }
/// Unselects the segment with the given index. If it's not selected or the
/// index is out of bounds, nothing happens. The segment is not unselected,
/// when it is the only segment that is selected. If the active segment is
/// unselected, the most recently selected segment remaining becomes the
/// active segment.
Unselects the segment with the given index. If it's not selected or the
index is out of bounds, nothing happens. The segment is not unselected,
when it is the only segment that is selected. If the active segment is
unselected, the most recently selected segment remaining becomes the
active segment.
Unselects the segment with the given index . If it ' s not selected or the index is out of bounds nothing happens . The segment is not unselected when it is the only segment that is selected . If the active segment is unselected the most recently selected segment remaining becomes the active segment .
pub fn unselect(&mut self, index: usize) {
        self.selected_segments.retain(|&i| i != index);
        if self.selected_segments.is_empty() {
            self.selected_segments.push(index);
        }
    }
pub fn unselect ( & mut self , index : usize ) { self . selected_segments . retain ( | & i | i != index ) ; if self . selected_segments . is_empty ( ) { self . selected_segments . push ( index ) ; } }
Unselects the segment with the given index.
Unselects the segment with the given index .
&mut self
index
usize
&mut self
index
usize