From 417ad0e3844449551e1aed34c147cd101ece1263 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Wed, 20 Jul 2022 23:32:50 -0700 Subject: [PATCH] Add rustdoc comment. --- src/uu/wc/src/count_fast.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/uu/wc/src/count_fast.rs b/src/uu/wc/src/count_fast.rs index 62b1a3ae5f8..5c8d97afdc7 100644 --- a/src/uu/wc/src/count_fast.rs +++ b/src/uu/wc/src/count_fast.rs @@ -135,6 +135,13 @@ pub(crate) fn count_bytes_and_lines_fast( } } +/// 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(handle: &mut R) -> (WordCount, Option) { /// Mask of the value bits of a continuation byte const CONT_MASK: u8 = 0b0011_1111u8;