1pub fn find_matches(result: &str, pattern: &str, mut writer: impl std::io::Write) { 2 for line in result.lines() { 3 if line.contains(pattern) { 4 writeln!(writer, "{}", line); 5 } 6 } 7}