Skip to content
Snippets Groups Projects
Commit 02f202ff authored by 8tab's avatar 8tab
Browse files

Use BufWriter (instead of LineWriter) for FILEs other than stdout and stderr

BufWriter has more capacity (8k vs 1k) and doesn't flush the stream after '\n'.
That change helps to reduce the number of syscalls, especially when dealing with text files.

Since BufWriter has a different way of getting number of pending elements than LineWriter -
Pending trait was introduced to deal with that.
parent ccee7eae
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment