INNER CODE UNIT · Rust

is_worthy

Drew-Alleman/DataSurgeon · src/main.rs:433

    fn is_worthy(&self, line: &str) -> bool {
        if !self.drop.is_empty() && self.drop_regex.is_match(line) {
            return false;
        }
        // check if filter regex was set and there was no match
        if !self.filter.is_empty() && self.filter_regex.is_match(line) {
            return true;
        }
        // no filter regex is set
        if self.filter.is_empty() {
            return true;
        }
        // a filter regex was set but there was no match
        return false;
    }

    // Searches through the specified regexes to determine if the data
    // provided is valuable information for the provided user

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…