Extract the main logic

This commit is contained in:
Manuel Thalmann 2025-03-19 08:12:38 +01:00
parent 30bb1d6438
commit 009bb0cb96
Signed by: manuth
SSH key fingerprint: SHA256:HsMLC+7kJWALP6YCYCoopxNbUnghwSGLVcG76SECT5c

View file

@ -13,6 +13,10 @@ fn main() {
println!("Searching for {}", config.query);
println!("In file {}", config.file_path);
run(config);
}
fn run(config: Config) {
let contents = fs::read_to_string(config.file_path)
.expect("Should have been able to read the file");