mirror of
https://github.com/uutils/coreutils
synced 2024-12-20 01:54:15 +00:00
ba8f4ea670
Refactor the counting code from the inner loop of the `wc` program into the `WordCount::from_line()` associated function. This commit also splits that function up into other helper functions that encapsulate decoding characters and finding word boundaries from raw bytes. This commit also implements the `Sum` trait for the `WordCount` struct, so that we can simply call `sum()` on an iterator that yields `WordCount` instances. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |