From 6dd410c3a972eeeb052d2f4c9cfad31ff7b2112c Mon Sep 17 00:00:00 2001 From: Rokas Puzonas Date: Fri, 5 Aug 2022 00:11:52 +0000 Subject: [PATCH] add todo --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 8f15c8d..b93eb30 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,6 +3,8 @@ use comment_parser::{CommentParser, SyntaxRule}; use ignore::Walk; use regex::Regex; +// TODO: add --ignore and --include support + #[derive(Debug)] struct Reminder { row: u32, @@ -51,7 +53,7 @@ fn list_reminders(path: &Path) -> Option> } let rules = rules.unwrap(); - let file_contents = fs::read_to_string(path).unwrap(); + let file_contents = fs::read_to_string(path).ok()?; let parser = CommentParser::new(&file_contents, rules); let mut search_from = 0; for comment in parser {