Skip to content

Commit 485b764

Browse files
committed
todos
1 parent c25e5b1 commit 485b764

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,8 @@ impl<'a> Iterator for ByteLinesState<'a> {
564564
}
565565
}
566566

567+
// TODO(cgag): do we have to worry about the case of single line comments being nested in multis?
568+
// I dn't think so but i should think about it.
567569
pub fn count(filepath: &str) -> Count {
568570
let lang = lang_from_ext(filepath);
569571
let (singles, multis) = counter_config_for_lang(lang);
@@ -575,6 +577,8 @@ pub fn count(filepath: &str) -> Count {
575577
return Count::default();
576578
}
577579
};
580+
// TODO(cgag): set the size of this vec to size of the file + a byte? a reddit comment
581+
// somewhere says fs::read will do this ofr you.
578582
let mut bytes = vec![];
579583
file.read_to_end(&mut bytes).expect("nani?!");
580584

0 commit comments

Comments
 (0)