-
-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Feature request: io::IsTerminal should not be sealed #161989
Copy link
Copy link
Open
Labels
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`Area: `std::io`, `std::fs`, `std::net` and `std::path`C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`Area: `std::io`, `std::fs`, `std::net` and `std::path`C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
This is a bit a companion of #161941 in the sense that I hit on the fact that
io::IsTerminalis sealed in the same situation.I have a
RenderTarget: io::Write + io::IsTerminaltrait in a tool that does fancy things on the terminal, and it would be great to be able to implement it for customio::Writeinstances, butio::IsTerminalis sealed so this is not possible.An ugly workaround is to have
RenderTarget: io::Write + IsTerminalExinstead whereIsTerminalExhas a blanket implementation forT: io::IsTerminal. But this is just a workaround for the fact thatio::IsTerminalis sealed.Assuming there are no reasons I don't know to keep
io::IsTerminalsealed, unsealing it would make life easier in this situation.