Skip to content

Commit

Permalink
Add rustdoc comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
resistor committed Jul 21, 2022
1 parent 13762ca commit 417ad0e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/uu/wc/src/count_fast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ pub(crate) fn count_bytes_and_lines_fast<R: Read>(
}
}

/// Returns a WordCount that counts the number of Unicode characters encoded in UTF-8 read via a Reader.
///
/// This corresponds to the `-m` command line flag to wc.
///
/// # Arguments
///
/// * `R` - A Reader from which the UTF-8 stream will be read.
pub(crate) fn count_chars_fast<R: Read>(handle: &mut R) -> (WordCount, Option<io::Error>) {
/// Mask of the value bits of a continuation byte
const CONT_MASK: u8 = 0b0011_1111u8;
Expand Down

0 comments on commit 417ad0e

Please sign in to comment.