the.bay.news

Feature request: `std::io::Sink` should implement `std::io::IsTerminal` (returning `false`)

Rust Internals
Feature request: `std::io::Sink` should implement `std::io::IsTerminal` (returning `false`)
I have a tool which formats output and error messages on the terminal depending on the terminal size and therefore needs to query io::IsTerminal often. I have a trait RenderTarget: io::Write + io::IsTerminal which is used throughout the code. Today I had the need to pass io::sink() to a function expecting a RenderTarget but io::sink() does not implement io::IsTerminal, and I cannot implement the latter for a wrapper type because it is sealed (by the way, why?). So I'm out of luck. I've found a...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.