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: collapse.rs
    path of file: ./repos/rusty-razor/razor-chase/src/chase/impl
    
    the code of the file until where you have to start completion: //! Provides an implementation of the chase by collapsing references to elements
//! of the model to avoid equational reasoning computation.
//!
//! [`coll
    
    fn witness(&self, element: &Element) -> Vec<Self::TermType> {
        self.rewrites
            .iter()
            .filter(|(_, e)| (*e).eq(element))
            .map(|(t, _)| t)
            .sorted()
            .into_iter()
            .dedup()
            .cloned()
            .collect()
    }