mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-01 21:47:46 +00:00
wc: Optimize, improve correctness
- Reuse allocations for read lines - Increase splice size - Check if /dev/null was opened correctly - Do not discard read bytes after I/O error - Add fast line counting with bytecount
This commit is contained in:
parent
c756878b20
commit
48437fc49d
6 changed files with 88 additions and 45 deletions
7
Cargo.lock
generated
7
Cargo.lock
generated
|
@ -188,6 +188,12 @@ dependencies = [
|
|||
"utf8-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bytecount"
|
||||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72feb31ffc86498dacdbd0fcebb56138e7177a8cc5cea4516031d15ae85a742e"
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.4.3"
|
||||
|
@ -3110,6 +3116,7 @@ dependencies = [
|
|||
name = "uu_wc"
|
||||
version = "0.0.7"
|
||||
dependencies = [
|
||||
"bytecount",
|
||||
"clap",
|
||||
"libc",
|
||||
"nix 0.20.0",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue