INNER CODE UNIT · Rust

create_headers

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

    fn create_headers(&self) -> () {
        let message = match (self.hide_type, self.display, self.count) {
            (true, true, true) => format!("file, line, data"),
            (true, true, false) => format!("file, data"),
            (true, false, true) => format!("line, data"),
            (true, false, false) => format!("data"),
            (false, true, true) => format!("content_type, file, line, data"),
            (false, true, false) => format!("content_type, file, data"),
            (false, false, true) => format!("content_type, line, data"),
            (false, false, false) => format!("content_type, data"),
        };
        self.write_to_file(&message);
    }

    // Iterates through the standard input to find important informatio
    fn iterate_stdin(&mut self) -> () {
        if !self.matches.get_one::<bool>("suppress").unwrap_or(&false) {
            println!("[*] Reading standard input. If you meant to analyze a file use 'ds -f <FILE>' (ctrl+c to exit)");

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…