summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 378dca7..0d099cc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -63,7 +63,9 @@ fn search_recursive(stats: &mut CodeStats, excludes: &Vec<String>, root: &std::p
}
fn analyze_file(stats: &mut CodeStats, path: &std::path::PathBuf) {
- let content = std::fs::read_to_string(path).unwrap();
+ let Ok(content) = std::fs::read_to_string(path) else {
+ return
+ };
let lines = content.lines().count();
if lines > stats.most_lines.value {