sharkdp / hexyl

A command-line hex viewer
Apache License 2.0
8.92k stars 227 forks source link

`/dev/zero` fix (final) #211

Closed sharifhsn closed 6 months ago

sharifhsn commented 6 months ago

Fixes #200.

Instead of flushing on every single print, it flushes only when the first line is printed. This produces the expected behavior for hexyl /dev/zero:

❯ target/debug/hexyl /dev/zero
┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
│00000000│ 00 00 00 00 00 00 00 00 ┊ 00 00 00 00 00 00 00 00 │⋄⋄⋄⋄⋄⋄⋄⋄┊⋄⋄⋄⋄⋄⋄⋄⋄│
^C
sharkdp commented 6 months ago

Thank you!