We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c25e5b1 commit 485b764Copy full SHA for 485b764
src/lib.rs
@@ -564,6 +564,8 @@ impl<'a> Iterator for ByteLinesState<'a> {
564
}
565
566
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.
569
pub fn count(filepath: &str) -> Count {
570
let lang = lang_from_ext(filepath);
571
let (singles, multis) = counter_config_for_lang(lang);
@@ -575,6 +577,8 @@ pub fn count(filepath: &str) -> Count {
575
577
return Count::default();
576
578
579
};
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.
582
let mut bytes = vec![];
583
file.read_to_end(&mut bytes).expect("nani?!");
584
0 commit comments