Skip to content

Commit

Permalink
todos
Browse files Browse the repository at this point in the history
  • Loading branch information
cgag committed Sep 9, 2018
1 parent c25e5b1 commit 485b764
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Expand Up @@ -564,6 +564,8 @@ impl<'a> Iterator for ByteLinesState<'a> {
}
}

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

Expand Down

0 comments on commit 485b764

Please sign in to comment.