about summary refs log tree commit diff
path: root/src/libstd/io/mod.rs
AgeCommit message (Collapse)AuthorLines
2016-05-06doc: binding not neededTshepang Lekhonkhobe-2/+1
2016-05-06doc: mut not neededTshepang Lekhonkhobe-1/+1
2016-05-02libstd: correct the link to functions in io module documentationRyman-2/+2
Currently the link refers to it's own section of the documentation rather than the list of functions generated by rustdoc.
2016-04-14Rollup merge of #32855 - troplin:take-bufread-fix, r=alexcrichtonSteve Klabnik-0/+12
Don't read past limit for in BufRead instance of Take Similar to `Read::read`, `BufRead::fill_buf` impl of `Take` should not call `inner.fill_buf` if the limit is already reached.
2016-04-11std: Stabilize APIs for the 1.9 releaseAlex Crichton-1/+1
This commit applies all stabilizations, renamings, and deprecations that the library team has decided on for the upcoming 1.9 release. All tracking issues have gone through a cycle-long "final comment period" and the specific APIs stabilized/deprecated are: Stable * `std::panic` * `std::panic::catch_unwind` (renamed from `recover`) * `std::panic::resume_unwind` (renamed from `propagate`) * `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`) * `std::panic::UnwindSafe` (renamed from `RecoverSafe`) * `str::is_char_boundary` * `<*const T>::as_ref` * `<*mut T>::as_ref` * `<*mut T>::as_mut` * `AsciiExt::make_ascii_uppercase` * `AsciiExt::make_ascii_lowercase` * `char::decode_utf16` * `char::DecodeUtf16` * `char::DecodeUtf16Error` * `char::DecodeUtf16Error::unpaired_surrogate` * `BTreeSet::take` * `BTreeSet::replace` * `BTreeSet::get` * `HashSet::take` * `HashSet::replace` * `HashSet::get` * `OsString::with_capacity` * `OsString::clear` * `OsString::capacity` * `OsString::reserve` * `OsString::reserve_exact` * `OsStr::is_empty` * `OsStr::len` * `std::os::unix::thread` * `RawPthread` * `JoinHandleExt` * `JoinHandleExt::as_pthread_t` * `JoinHandleExt::into_pthread_t` * `HashSet::hasher` * `HashMap::hasher` * `CommandExt::exec` * `File::try_clone` * `SocketAddr::set_ip` * `SocketAddr::set_port` * `SocketAddrV4::set_ip` * `SocketAddrV4::set_port` * `SocketAddrV6::set_ip` * `SocketAddrV6::set_port` * `SocketAddrV6::set_flowinfo` * `SocketAddrV6::set_scope_id` * `<[T]>::copy_from_slice` * `ptr::read_volatile` * `ptr::write_volatile` * The `#[deprecated]` attribute * `OpenOptions::create_new` Deprecated * `std::raw::Slice` - use raw parts of `slice` module instead * `std::raw::Repr` - use raw parts of `slice` module instead * `str::char_range_at` - use slicing plus `chars()` plus `len_utf8` * `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8` * `str::char_at` - use slicing plus `chars()` * `str::char_at_reverse` - use slicing plus `chars().rev()` * `str::slice_shift_char` - use `chars()` plus `Chars::as_str` * `CommandExt::session_leader` - use `before_exec` instead. Closes #27719 cc #27751 (deprecating the `Slice` bits) Closes #27754 Closes #27780 Closes #27809 Closes #27811 Closes #27830 Closes #28050 Closes #29453 Closes #29791 Closes #29935 Closes #30014 Closes #30752 Closes #31262 cc #31398 (still need to deal with `before_exec`) Closes #31405 Closes #31572 Closes #31755 Closes #31756
2016-04-09Don't read past limit for in BufRead instance of TakeTobias Müller-0/+12
2016-04-02Drop the default buffer size to 8KSteven Fackler-1/+1
The 64k capacity was picked by me a couple of years ago in the initial implementation of buffered IO adaptors: https://github.com/rust-lang/rust/pull/9091/files#diff-b131eeef531ad098b32f49695a031008R62. 64K was picked for symmetry with libuv, which we no longer use. 64K is *way* larger than the default size of any other language that I can find. C, C++, and Java default to 8K, and Go defaults to 4K. There have been a variety of issues filed relating to this such as #31885. Closes #31885
2016-03-29Auto merge of #32541 - troplin:chain-bufread, r=alexcrichtonbors-0/+54
Implement BufRead for Chain Addresses #32536
2016-03-28Fix formattingTobias Müller-2/+5
2016-03-28Use ? instead of try!, add some basic testsTobias Müller-1/+31
2016-03-28Implement BufRead for ChainTobias Müller-0/+21
2016-03-27Extend linkchecker with anchor checkingmitaa-1/+1
This adds checks to ensure that: * link anchors refer to existing id's on the target page * id's are unique within an html document * page redirects are valid
2016-03-22try! -> ?Jorge Aparicio-3/+3
Automated conversion using the untry tool [1] and the following command: ``` $ find -name '*.rs' -type f | xargs untry ``` at the root of the Rust repo. [1]: https://github.com/japaric/untry
2016-03-12std: Clean out deprecated APIsAlex Crichton-150/+0
Removes all unstable and deprecated APIs prior to the 1.8 release. All APIs that are deprecated in the 1.8 release are sticking around for the rest of this cycle. Some notable changes are: * The `dynamic_lib` module was moved into `rustc_back` as the compiler still relies on a few bits and pieces. * The `DebugTuple` formatter now special-cases an empty struct name with only one field to append a trailing comma.
2016-02-26Rollup merge of #31904 - bluss:writer-formatter-error, r=alexcrichtonManish Goregaokar-1/+8
Make sure formatter errors are emitted by the default Write::write_fmt Previously, if an error was returned from the formatter that did not originate in an underlying writer error, Write::write_fmt would return successfully even if the formatting did not complete (was interrupted by an `fmt::Error` return). Now we choose to emit an io::Error with kind Other for formatter errors. Since this may reveal error returns from `write!()` and similar that previously passed silently, it's a kind of a [breaking-change]. Fixes #31879
2016-02-26Make sure formatter errors are emitted by the default Write::write_fmtUlrik Sverdrup-1/+8
Previously, if an error was returned from the formatter that did not originate in an underlying writer error, Write::write_fmt would return successfully even if the formatting did not complete (was interrupted by an `fmt::Error` return). Now we choose to emit an io::Error with kind Other for formatter errors. Since this may reveal error returns from `write!()` and similar that previously passed silently, it's a kind of a [breaking-change].
2016-02-23Register new snapshotsAaron Turon-3/+3
2016-01-15Auto merge of #30898 - petrochenkov:tvarfstab, r=alexcrichtonbors-3/+3
This wasn't done in https://github.com/rust-lang/rust/pull/29083 because attributes weren't parsed on fields of tuple variant back then. r? @alexcrichton
2016-01-14Require stability annotations on fields of tuple variantsVadim Petrochenkov-3/+3
2016-01-13Fix some broken and missing links in the docsOliver Middleton-13/+13
2016-01-02Adjusted heading and created dedicated section in std::io docsNathan-0/+9
2015-12-30doc: fix grammarTshepang Lekhonkhobe-2/+2
2015-12-29Fix warnings when compiling stdlib with --testFlorian Hahn-1/+1
2015-12-26Fix links in docs for std::ioFlorian Hartwig-4/+4
2015-12-18Use memchr in libstd where possible, closes #30076Florian Hahn-1/+2
2015-12-09doc: these are just renames, so avoid duplicationTshepang Lekhonkhobe-1/+1
2015-12-05std: Stabilize APIs for the 1.6 releaseAlex Crichton-9/+30
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * The `#![no_std]` attribute * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968
2015-11-18Add missing annotations and some testsVadim Petrochenkov-0/+8
2015-11-06Remove stability annotations from trait impl itemsVadim Petrochenkov-1/+0
Remove `stable` stability annotations from inherent impls
2015-10-17Fix minor issues with std::io docsKevin Yap-7/+7
2015-10-08typos: fix a grabbag of typos all over the placeCristi Cobzarenco-2/+2
2015-09-30Make note of performance implications of ReadSteve Klabnik-0/+7
Fixes #28073
2015-09-03std: Account for CRLF in {str, BufRead}::linesAlex Crichton-4/+7
This commit is an implementation of [RFC 1212][rfc] which tweaks the behavior of the `str::lines` and `BufRead::lines` iterators. Both iterators now account for `\r\n` sequences in addition to `\n`, allowing for less surprising behavior across platforms (especially in the `BufRead` case). Splitting *only* on the `\n` character can still be achieved with `split('\n')` in both cases. The `str::lines_any` function is also now deprecated as `str::lines` is a drop-in replacement for it. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1212-line-endings.md Closes #28032
2015-08-30Auto merge of #27588 - cesarb:read_all, r=alexcrichtonbors-0/+107
This implements the proposed "read_exact" RFC (https://github.com/rust-lang/rfcs/pull/980). Tracking issue: https://github.com/rust-lang/rust/issues/27585
2015-08-28Add issue number to read_exact unstable declarationsCesar Eduardo Barros-1/+1
2015-08-24Implement read_exact for the Read traitCesar Eduardo Barros-0/+107
This implements the proposed "read_exact" RFC (https://github.com/rust-lang/rfcs/pull/980).
2015-08-18Remove repetition in Seek::seek() docRemi Rampin-3/+0
2015-08-15std: Add issues to all unstable featuresAlex Crichton-12/+24
2015-08-12Remove all unstable deprecated functionalityAlex Crichton-1/+1
This commit removes all unstable and deprecated functions in the standard library. A release was recently cut (1.3) which makes this a good time for some spring cleaning of the deprecated functions.
2015-08-02Docs: clarify return value of std::io::Seek::seekSimon Sapin-2/+3
2015-07-29Rollup merge of #27327 - steveklabnik:fix_take, r=alexcrichtonSteve Klabnik-1/+1
This only reads five bytes, so don't use a ten byte buffer, that's confusing. r? @alexcrichton
2015-07-27std: Deprecate a number of unstable featuresAlex Crichton-1/+1
Many of these have long since reached their stage of being obsolete, so this commit starts the removal process for all of them. The unstable features that were deprecated are: * cmp_partial * fs_time * hash_default * int_slice * iter_min_max * iter_reset_fuse * iter_to_vec * map_in_place * move_from * owned_ascii_ext * page_size * read_and_zero * scan_state * slice_chars * slice_position_elem * subslice_offset
2015-07-27Fix buffer length in std::io::takeSteve Klabnik-1/+1
This only reads five bytes, so don't use a ten byte buffer, that's confusing.
2015-07-22Rollup merge of #27167 - steveklabnik:doc_std_io_take, r=alexcrichtonSteve Klabnik-2/+8
Better and more consistent links to their creators.
2015-07-22Rollup merge of #27157 - steveklabnik:doc_std_io_iterators, r=alexcrichtonSteve Klabnik-11/+28
Make them all consistent and link up the documentation. r? @alexcrichton
2015-07-20Write better docs for std::ioSteve Klabnik-0/+229
This is the landing page for all of io, so we should have more than just a sentence here.
2015-07-20Update docs for take and broadcastSteve Klabnik-2/+8
Better and more consistent links to their creators.
2015-07-20Document iterators in std::ioSteve Klabnik-11/+28
Make them all consistent and link up the documentation.
2015-07-16Merge branch 'doc_io_traits_enums' of https://github.com/steveklabnik/rust ↵Steve Klabnik-58/+601
into rollup_central
2015-07-16More docs for std::io free functions.Steve Klabnik-10/+10