diff --git a/lychee-bin/src/main.rs b/lychee-bin/src/main.rs index 2fbe82f..f275e42 100644 --- a/lychee-bin/src/main.rs +++ b/lychee-bin/src/main.rs @@ -118,13 +118,10 @@ fn run_main() -> Result { // Load excludes from file for path in &opts.config.exclude_file { - let file = File::open(path).expect("No such file"); - opts.config.exclude.append( - &mut io::BufReader::new(file) - .lines() - .map(|l| l.expect("Could not read line")) - .collect(), - ); + let file = File::open(path)?; + opts.config + .exclude + .append(&mut io::BufReader::new(file).lines().collect::>()?); } let cfg = &opts.config;