rusty_tool/
lib.rs

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