mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
rustfmt src/uu/wc/src/wc.rs
Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
This commit is contained in:
parent
e3bd6b6848
commit
dab1b9ba1a
1 changed files with 1 additions and 2 deletions
|
@ -147,8 +147,7 @@ fn wc(files: Vec<String>, settings: &Settings) -> StdResult<(), i32> {
|
||||||
let mut max_width: usize = 0;
|
let mut max_width: usize = 0;
|
||||||
|
|
||||||
// we do not need to decode the byte stream if we're only counting bytes/newlines
|
// we do not need to decode the byte stream if we're only counting bytes/newlines
|
||||||
let decode_chars = settings.show_chars
|
let decode_chars = settings.show_chars || settings.show_words || settings.show_max_line_length;
|
||||||
|| settings.show_words || settings.show_max_line_length;
|
|
||||||
|
|
||||||
for path in &files {
|
for path in &files {
|
||||||
let mut reader = open(&path[..])?;
|
let mut reader = open(&path[..])?;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue