rust_tool_this/
lib.rs

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