about summary refs log tree commit diff
path: root/src/libstd/io/buffered.rs
AgeCommit message (Collapse)AuthorLines
2014-01-08Robustly read remaining bytes in a characterAlex Crichton-1/+7
Closes #11372
2014-01-07stdtest: Fix all leaked trait importsAlex Crichton-1/+2
2014-01-04Don't allow newtype structs to be dereferenced. #6246Brian Anderson-5/+27
2013-12-23Add tests for 0-byte read propagation.Sébastien Paolacci-0/+28
The two `Some(0)' used to be `None' before the patch, a zero-byte long read exhausting a reader (and thereafter) still produce a `None'.
2013-12-16Make BufferedReader propagate 0-byte long reads.Sébastien Paolacci-3/+3
Could prevent callers from catching the situation and lead to e.g early iterator terminations (cf. `Reader::read_byte') since `None' is only to be returned only on EOF.
2013-12-15auto merge of #10984 : huonw/rust/clean-raw, r=cmrbors-4/+4
See commits for details.
2013-12-15Move std::{str,vec}::raw::set_len to an unsafe method on Owned{Vector,Str}.Huon Wilson-2/+2
2013-12-15std::vec: remove unnecessary count parameter on {bytes,Huon Wilson-2/+2
raw}::copy_memory. Slices carry their length with them, so we can just use that information.
2013-12-15std: fix spelling in docs.Huon Wilson-2/+2
2013-12-11std::io: Add Buffer.lines(), change .bytes() apiklutzy-0/+22
- `Buffer.lines()` returns `LineIterator` which yields line using `.read_line()`. - `Reader.bytes()` now takes `&mut self` instead of `self`. - `Reader.read_until()` swallows `EndOfFile`. This also affects `.read_line()`.
2013-11-30Fixes for BufferedWriter and LineBufferedWriterSteven Fackler-10/+28
BufferedWriter::inner flushes before returning the underlying writer. BufferedWriter::write no longer flushes the underlying writer. LineBufferedWriter::write flushes up to the *last* newline in the input string, not the first.
2013-11-26test: Remove non-procedure uses of `do` from compiletest, libstd tests,Patrick Walton-6/+6
compile-fail tests, run-fail tests, and run-pass tests.
2013-11-19Implement more native file I/OAlex Crichton-1/+0
This implements a fair amount of the unimpl() functionality in io::native relating to filesystem operations. I've also modified all io::fs tests to run in both a native and uv environment (so everything is actually tested). There are a two bits of remaining functionality which I was unable to get working: * change_file_times on windows * lstat on windows I think that change_file_times may just need a better interface, but lstat has a large implementation in libuv which I didn't want to tackle trying to copy.
2013-11-13Introduce an io::Buffer traitAlex Crichton-81/+26
This trait is meant to abstract whether a reader is actually implemented with an underlying buffer. For all readers which are implemented as such, we can efficiently implement things like read_char, read_line, read_until, etc. There are two required methods for managing the internal buffer, and otherwise read_line and friends can all become default methods. Closes #10334
2013-11-12io: benchmarks for creation of the various Buffered objectsCorey Richardson-0/+42
2013-11-11Move std::rt::io to std::ioAlex Crichton-0/+473