1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-01 21:47:46 +00:00

wc: Stricter simpler error handling

Errors are now always shown with the corresponding filename.

Errors are no longer converted into warnings. Previously `wc < .`
would cause a loop.

Checking whether something is a directory is no longer done in
advance. This removes race conditions and the edge case where stdin is
a directory.

The custom error type is removed because io::Error is now enough.
This commit is contained in:
Jan Verbeek 2021-08-25 14:26:03 +02:00 committed by Michael Debertol
parent 35793fc260
commit 657a04f706
5 changed files with 26 additions and 47 deletions

1
Cargo.lock generated
View file

@ -3126,7 +3126,6 @@ dependencies = [
"clap",
"libc",
"nix 0.20.0",
"thiserror",
"unicode-width",
"utf-8",
"uucore",