Extract the main logic
This commit is contained in:
parent
30bb1d6438
commit
009bb0cb96
1 changed files with 4 additions and 0 deletions
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in a new issue