]> git.lizzy.rs Git - rust.git/commit
auto merge of #12422 : alexcrichton/rust/buffered-default, r=brson
authorbors <bors@rust-lang.org>
Sat, 22 Feb 2014 07:56:47 +0000 (23:56 -0800)
committerbors <bors@rust-lang.org>
Sat, 22 Feb 2014 07:56:47 +0000 (23:56 -0800)
commit068781e5aa6d2b6af04aeb6c44de4296a5a0b004
tree0ed28c6d380d79c5a162d6a44b6939c822e82988
parent698042de238644341b798238bd5a61ea2f3c0f20
parent7736985f78e43aa2e7f45c5ad19a520c97f45d8f
auto merge of #12422 : alexcrichton/rust/buffered-default, r=brson

One of the most common ways to use the stdin stream is to read it line by line
for a small program. In order to facilitate this common usage pattern, this
commit changes the stdin() function to return a BufferedReader by default. A new
`stdin_raw()` method was added to get access to the raw unbuffered stream.

I have not changed the stdout or stderr methods because they are currently
unable to flush in their destructor, but #12403 should have just fixed that.
src/libstd/io/mod.rs