summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 767914d..af3b56a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -43,10 +43,7 @@ fn run(config: Config) -> Result<(), Box<dyn Error>> {
&mut file_read
};
- let mut contents = String::new();
- reader.read_to_string(&mut contents)?;
-
- for line in trgrep::search(&config.pattern, &contents) {
+ for line in reader.lines().map(|l| l.unwrap().contains(&config.pattern)) {
println!("{line}");
}
}