You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: filtered_stage.rs
    path of file: ./repos/broot/src/stage
    
    the code of the file until where you have to start completion: use {
    super::*,
    crate::{
        pattern::*,
    },
    std::{
        convert::TryFrom,
        path::Path,
    },
};

#[derive(Clone)]
pub struct FilteredStage {
    stage_version: usize,
    paths_idx: Vec<usize>, // indexes of the matching paths in the stage
    pattern: InputPattern, // an optional filtering pattern
    selection: Optio
    
    pub fn unstage_selection(&mut self, stage: &mut Stage) -> bool {
        if let Some(spi) = self.selection {
            stage.remove_idx(self.paths_idx[spi]);
            self.stage_version = stage.version();
            self.compute(stage);
            if spi >= self.paths_idx.len() {
                self.selection = Some(spi);
            };
            true
        } else {
            false
        }
    }