Skip to content
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

Merged
merged 1 commit into from
May 19, 2024

Conversation

foresterre
Copy link
Contributor

No description provided.

@rustbot
Copy link
Collaborator

rustbot commented May 10, 2024

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 (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 10, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@foresterre foresterre force-pushed the example/is-terminal branch 2 times, most recently from 4506240 to 1e56160 Compare May 11, 2024 01:12
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@foresterre foresterre force-pushed the example/is-terminal branch 2 times, most recently from ed46c9b to 38ba445 Compare May 16, 2024 19:04
Copy link
Contributor

@ChrisDenton ChrisDenton left a 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`]:
Copy link
Contributor

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.

library/std/src/io/stdio.rs Outdated Show resolved Hide resolved
library/std/src/io/stdio.rs Outdated Show resolved Hide resolved
@ChrisDenton
Copy link
Contributor

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 19, 2024

📌 Commit 0b6baf6 has been approved by ChrisDenton

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 19, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request May 19, 2024
…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
@bors bors merged commit c5b8c7c into rust-lang:master May 19, 2024
6 checks passed
@rustbot rustbot added this to the 1.80.0 milestone May 19, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 19, 2024
Rollup merge of rust-lang#124992 - foresterre:example/is-terminal, r=ChrisDenton

Add example to IsTerminal::is_terminal
@foresterre foresterre deleted the example/is-terminal branch May 20, 2024 00:34
@foresterre foresterre restored the example/is-terminal branch May 20, 2024 00:34
bors added a commit to rust-lang-ci/rust that referenced this pull request May 30, 2024
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants