Skip to content

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

8tab requested to merge 8tab/relibc:bufwriter into master

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.

Merge request reports