Skip to content

Commit

Permalink
Add docs for stdin in core::io.
Browse files Browse the repository at this point in the history
  • Loading branch information
steveklabnik committed May 19, 2013
1 parent 9f67169 commit a389d86
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/libcore/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,16 @@ pub fn FILE_reader(f: *libc::FILE, cleanup: bool) -> @Reader {
// top-level functions that take a reader, or a set of default methods on
// reader (which can then be called reader)

/**
* Gives a `Reader` that allows you to read values from standard input.
*
* # Examples
* ~~~
* let stdin = core::io::stdin();
* let line = stdin.read_line();
* core::io::print(line);
* ~~~
*/
pub fn stdin() -> @Reader {
unsafe {
@rustrt::rust_get_stdin() as @Reader
Expand Down

5 comments on commit a389d86

@bors
Copy link
Contributor

@bors bors commented on a389d86 May 19, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from brson
at steveklabnik@a389d86

@bors
Copy link
Contributor

@bors bors commented on a389d86 May 19, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging steveklabnik/rust/stdin_docs = a389d86 into auto

@bors
Copy link
Contributor

@bors bors commented on a389d86 May 19, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

steveklabnik/rust/stdin_docs = a389d86 merged ok, testing candidate = ebdb0de

@bors
Copy link
Contributor

@bors bors commented on a389d86 May 19, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on a389d86 May 19, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding incoming to auto = ebdb0de

Please sign in to comment.