pub fn run(config: Config) -> Result<(), Box<dyn Error>>
Expand description
Runs the search based on the provided configuration.
§Arguments
config
- AConfig
struct containing the query, filename, and case sensitivity flag.
§Returns
Result<(), Box<dyn Error>>
- ReturnsOk(())
if successful, or an error if something goes wrong.
§Examples
use quewuigrep::{Config, run};
use std::env;
let args: Vec<String> = vec!["program".into(), "query".into(), "filename.txt".into()];
let config = Config::new(&args).unwrap();
run(config).unwrap();