fn format_existing<T: BufRead>(&self, existing: T) -> String {
        // TODO: is unwrap safe?
        let existing_items = existing.lines().collect::<Result<Vec<_>, _>>().unwrap();

        let ignore_items = &self.ignore;

        let mut out = String::new();

        for item in ignore_items {
            if existing_items.contains(item) {
                out.push('#');
            }
            out.push_str(item);
            out.push('\n');
        }

        out
    }
/// format_existing is used to format the IgnoreList when the ignore file
/// already exists. It reads the contents of the given `BufRead` and
/// checks if the contents of the ignore list are already existing in the
/// file.
format_existing is used to format the IgnoreList when the ignore file
already exists. It reads the contents of the given `BufRead` and
checks if the contents of the ignore list are already existing in the
file.
format_existing is used to format the IgnoreList when the ignore file already exists . It reads the contents of the given ` BufRead ` and checks if the contents of the ignore list are already existing in the file .
fn format_existing<T: BufRead>(&self, existing: T) -> String {
        // TODO: is unwrap safe?
        let existing_items = existing.lines().collect::<Result<Vec<_>, _>>().unwrap();
        let ignore_items = &self.ignore;
        let mut out = String::new();
        for item in ignore_items {
            if existing_items.contains(item) {
                out.push('#');
            }
            out.push_str(item);
            out.push('\n');
        }
        out
    }
fn format_existing < T : BufRead > ( & self , existing : T ) -> String { // TODO: is unwrap safe? let existing_items = existing . lines ( ) . collect :: < Result < Vec < _ > , _ > > ( ) . unwrap ( ) ; let ignore_items = & self . ignore ; let mut out = String :: new ( ) ; for item in ignore_items { if existing_items . contains ( item ) { out . push ( '#' ) ; } out . push_str ( item ) ; out . push ( '\n' ) ; } out }
format_existing is used to format the IgnoreList when the ignore file
already exists.
format_existing is used to format the IgnoreList when the ignore file already exists .
&self
existing
T
&self
existing
T