Export find_char_boundary hidden

Used in cli_utils for printing report totals with number formats.
This commit is contained in:
NickHackman 2020-07-17 15:45:44 -04:00 committed by XAMPPRocky
parent 3f1491e582
commit f37b2db17a
2 changed files with 3 additions and 2 deletions

View file

@ -58,5 +58,5 @@ pub use self::{
config::Config,
language::{Language, LanguageType, Languages},
sort::Sort,
stats::{CodeStats, Report},
stats::{find_char_boundary, CodeStats, Report},
};

View file

@ -93,7 +93,8 @@ impl ops::AddAssign<CodeStats> for Report {
}
}
fn find_char_boundary(s: &str, index: usize) -> usize {
#[doc(hidden)]
pub fn find_char_boundary(s: &str, index: usize) -> usize {
for i in 0..4 {
if s.is_char_boundary(index + i) {
return index + i;