about summary refs log tree commit diff
path: root/src/libstd/rt/io
AgeCommit message (Collapse)AuthorLines
2013-09-21std: add file::io::test module and ensure correct buildJeff Olson-243/+251
2013-09-21std: cleanup file::io rustdoc_ng outputJeff Olson-67/+49
2013-09-20auto merge of #9320 : ↵bors-2/+1
chris-morgan/rust/unreachable-macro-part-two-of-two-containing-the-destruction-of-the-unreachable-function, r=alexcrichton This is the second of two parts of #8991, now possible as a new snapshot has been made. (The first part implemented the unreachable!() macro; it was #8992, 6b7b8f2682.) ``std::util::unreachable()`` is removed summarily; any code which used it should now use the ``unreachable!()`` macro. Closes #9312. Closes #8991.
2013-09-19Ignore io::process testsAlex Crichton-0/+6
They're causing syscalls to get interrupted, and std::io doesn't correctly handle EINTR
2013-09-19Replace unreachable() calls with unreachable!().Chris Morgan-2/+1
This is the second of two parts of #8991, now possible as a new snapshot has been made. (The first part implemented the unreachable!() macro; it was #8992, 6b7b8f2682.) ``std::util::unreachable()`` is removed summarily; any code which used it should now use the ``unreachable!()`` macro. Closes #9312. Closes #8991.
2013-09-18Implement process bindings to libuvAlex Crichton-0/+363
This is a re-landing of #8645, except that the bindings are *not* being used to power std::run just yet. Instead, this adds the bindings as standalone bindings inside the rt::io::process module. I made one major change from before, having to do with how pipes are created/bound. It's much clearer now when you can read/write to a pipe, as there's an explicit difference (different types) between an unbound and a bound pipe. The process configuration now takes unbound pipes (and consumes ownership of them), and will return corresponding pipe structures back if spawning is successful (otherwise everything is destroyed normally).
2013-09-18Register new snapshotsAlex Crichton-8/+4
2013-09-17std: whitespace clean up io::file docsJeff Olson-52/+52
2013-09-16std: docstring fixes in io::fileJeff Olson-239/+259
2013-09-16std: minor cleanup in some io_error descs in io::fileJeff Olson-2/+2
2013-09-16std: lots of docs for std::rt::io::fileJeff Olson-52/+298
i hope they don't bitrot
2013-09-16std: generlize & move io::file::suppressed_stat to io::ignore_io_errorJeff Olson-19/+19
2013-09-16std: unignore some file io tests that work on windows, nowJeff Olson-4/+0
2013-09-16std: bind uv_fs_readdir(), flesh out DirectoryInfo and docs/cleanupJeff Olson-8/+77
2013-09-16std: expose more stat infoJeff Olson-6/+2
2013-09-16std: clean up Dir/FileInfo inheritence and flesh out Dir InfoJeff Olson-59/+129
2013-09-16std: adding file::{stat,mkdir,rmdir}, FileInfo and FileReader/FileWriterJeff Olson-89/+195
add ignores for win32 tests on previous file io stuff...
2013-09-16std/rt: in-progress file io workJeff Olson-6/+180
std: remove unneeded field from RequestData struct std: rt::uv::file - map us_fs_stat & start refactoring calls into FsRequest std: stubbing out stat calls from the top-down into uvio std: us_fs_* operations are now by-val self methods on FsRequest std: post-rebase cleanup std: add uv_fs_mkdir|rmdir + tests & minor test cleanup in rt::uv::file WORKING: fleshing out FileStat and FileInfo + tests std: reverting test files.. refactoring back and cleanup...
2013-09-16auto merge of #9108 : blake2-ppc/rust/hazards-on-overflow, r=alexcrichtonbors-1/+1
Fix uint overflow bugs in std::{at_vec, vec, str} Closes #8742 Fix issue #8742, which summarized is: unsafe code in vec and str did assume that a reservation for `X + Y` elements always succeeded, and didn't overflow. Introduce the method `Vec::reserve_additional(n)` to make it easy to check for overflow in `Vec::push` and `Vec::push_all`. In std::str, simplify and remove a lot of the unsafe code and use `push_str` instead. With improvements to `.push_str` and the new function `vec::bytes::push_bytes`, it looks like this change has either no or positive impact on performance. I believe there are many places still where `v.reserve(A + B)` still can overflow. This by itself is not an issue unless followed by (unsafe) code that steps aside boundary checks.
2013-09-17rt::io: Use vec::reserve_additionalblake2-ppc-1/+1
2013-09-16std::rt::io::net::tcp: Fix one tcp test on Win32klutzy-2/+7
Fixes `connect_error` part of #8811.
2013-09-16std::rt::io::support: Fix ignored test on Win32klutzy-2/+1
Assumes drive C: exists. Closes #8812.
2013-09-15std::rt::io::file: Enable I/O tests on Win32klutzy-5/+3
Enable blocked tests which are now fixed by #9165. Closes #8810.
2013-09-14auto merge of #9191 : huonw/rust/are-you-tired, r=cmrbors-0/+14
Allows `std::rt::io::timer::sleep(1000)` rather than `std::rt::io::timer::Timer::new().unwrap().sleep(1000)`.
2013-09-15std::rt: Add a standalone sleep function.Huon Wilson-0/+14
2013-09-14auto merge of #9156 : sfackler/rust/buffered-fix, r=huonwbors-13/+19
This is a workaround for #9155. Currently, any uses of BufferedStream outside of libstd ICE.
2013-09-12Stop using newtypes in rt::io::bufferedSteven Fackler-13/+19
This is a workaround for #9155. Currently, any uses of BufferedStream outside of libstd ICE.
2013-09-12std: Rename {Option,Result}::chain{,_err}* to {and_then,or_else}Erick Tryzelaar-1/+1
2013-09-11auto merge of #9114 : sfackler/rust/flush-fix, r=brsonbors-1/+1
2013-09-11auto merge of #9038 : singingboyo/rust/with-mem-writer, r=anasazibors-0/+14
This is in many ways a replacement for the current std::io::with_str_writer.
2013-09-11auto merge of #8999 : anasazi/rust/multi-threaded-io-tests, r=brsonbors-37/+136
Resolves #8685
2013-09-10Don't fail in TcpStream.flushSteven Fackler-1/+1
2013-09-10Buffered I/O wrappersSteven Fackler-0/+358
The default buffer size is the same as the one in Java's BufferedWriter. We may want BufferedWriter to have a Drop impl that flushes, but that isn't possible right now due to #4252/#4430. This would be a bit awkward due to the possibility of the inner flush failing. For what it's worth, Java's BufferedReader doesn't have a flushing finalizer, but that may just be because Java's finalizer support is awful. Closes #8953
2013-09-06Add with_mem_writer to std::rt::io::mem.Brandon Sanderson-0/+14
This is in many ways a replacement for the current std::io::with_str_writer.
2013-09-06Make I/O tests use run_in_mt_newsched_task to get more multi-threaded test ↵Eric Reed-37/+136
coverage
2013-09-06Upgrade libuv to the current master (again)Alex Crichton-1/+1
This is a reopening of the libuv-upgrade part of #8645. Hopefully this won't cause random segfaults all over the place. The windows regression in testing should also be fixed (it shouldn't build the whole compiler twice). A notable difference from before is that gyp is now a git submodule instead of always git-cloned at make time. This allows bundling for releases more easily. Closes #8850
2013-09-06Fix Acceptor iterator ending early if a connection attempt failsEric Reed-4/+9
2013-09-09rename `std::iterator` to `std::iter`Daniel Micay-1/+1
The trait will keep the `Iterator` naming, but a more concise module name makes using the free functions less verbose. The module will define iterables in addition to iterators, as it deals with iteration in general.
2013-09-06auto merge of #9000 : brson/rust/dns, r=anasazibors-7/+63
This exposes a very simple function for resolving host names. There's a lot more that needs to be done, but this is probably enough for servo to get started connecting to real websites again.
2013-09-05auto merge of #8997 : fhahn/rust/issue_8985, r=catamorphism,brsonbors-8/+8
Patch for #8985
2013-09-05std::rt: Add get_host_addresses functionBrian Anderson-9/+44
This is a very simplistic method for host name resolution. It converts a host name to a vector of IP addresses. Should be enough to get started.
2013-09-05std::rt: Add libuv bindings for getaddrinfoBrian Anderson-0/+21
2013-09-05Rename str::from_bytes to str::from_utf8, closes #8985Florian Hahn-8/+8
2013-09-05Implement Stream automatically for Reader + WriterChris Morgan-0/+2
This is consistent with the existing documentation but was not the actual behaviour, which I've found to be rather a nuisance, actually.
2013-09-04auto merge of #8977 : pnkfelix/rust/fsk-followup-on-6009-rebased, r=alexcrichtonbors-5/+3
Fix #6009. Rebased version of #8970. Inherits review from alexcrichton.
2013-09-04auto merge of #8935 : blake2-ppc/rust/reader-bytes, r=brsonbors-1/+89
An iterator that simply calls `.read_bytes()` each iteration. I think choosing to own the Reader value and implementing Decorator to allow extracting it is the most generically useful. The Reader type variable can of course be some kind of reference type that implements Reader. In the generic form the `Bytes` iterator is well behaved itself and does not read ahead. It performs abysmally on top of a FileStream, and much better if a buffering reader is inserted inbetween.
2013-09-04stop treating char as an integer typeDaniel Micay-6/+7
Closes #7609
2013-09-04Added explicit pub to several conditions. Enables completion of #6009.Felix S. Klock II-5/+3
2013-09-03auto merge of #8963 : jmgrosen/rust/issue-8881, r=alexcrichtonbors-0/+4
2013-09-03Fixes #8881. condition! imports parent's pub identifiersjmgrosen-0/+4