-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add example to IsTerminal::is_terminal #124992
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ChrisDenton (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
This comment has been minimized.
This comment has been minimized.
baf0506
to
851ffd9
Compare
This comment has been minimized.
This comment has been minimized.
851ffd9
to
b729070
Compare
This comment has been minimized.
This comment has been minimized.
4506240
to
1e56160
Compare
This comment has been minimized.
This comment has been minimized.
1e56160
to
20e1773
Compare
This comment has been minimized.
This comment has been minimized.
ed46c9b
to
38ba445
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. I'm fine with it as-is but there are a couple of things which I think might make it better.
@@ -1161,7 +1161,39 @@ pub trait IsTerminal: crate::sealed::Sealed { | |||
/// starting with `msys-` or `cygwin-` and ending in `-pty` will be considered terminals. | |||
/// Note that this [may change in the future][changes]. | |||
/// | |||
/// # Examples | |||
/// | |||
/// An example of a type for which `IsTerminal` is implemented is [`Stdin`]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be great, though not essential, to have an example that includes both Stdin
and Stdout
.
38ba445
to
0b6baf6
Compare
Thanks! @bors r+ rollup |
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#124948 (chore: Remove repeated words (extension of rust-lang#124924)) - rust-lang#124992 (Add example to IsTerminal::is_terminal) - rust-lang#125279 (make `Debug` impl for `Term` simpler) - rust-lang#125286 (Miri subtree update) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#124992 - foresterre:example/is-terminal, r=ChrisDenton Add example to IsTerminal::is_terminal
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#124948 (chore: Remove repeated words (extension of rust-lang#124924)) - rust-lang#124992 (Add example to IsTerminal::is_terminal) - rust-lang#125279 (make `Debug` impl for `Term` simpler) - rust-lang#125286 (Miri subtree update) r? `@ghost` `@rustbot` modify labels: rollup
No description provided.