BurntSushi / xsv

A fast CSV command line toolkit written in Rust.
The Unlicense
10.35k stars 321 forks source link

xsv might silently fail #320

Open lukaslueg opened 1 year ago

lukaslueg commented 1 year ago

https://github.com/BurntSushi/xsv/blob/4278b8593260bb2e9bfdf6e91cc4df5b7df5b8fb/src/cmd/index.rs#L55-L58

Notice that there is a bug here: If the output is small enough to delay flushing the BufWriter until the (implicit) drop at the end of the scope, the BufWriter might fail for whatever reason to write to the underlying, yet its destructor will silently discard the error.