summary refs log tree commit diff
path: root/src/libstd/io.rs
AgeCommit message (Collapse)AuthorLines
2013-09-25rustdoc: Change all code-blocks with a scriptAlex Crichton-10/+10
find src -name '*.rs' | xargs sed -i '' 's/~~~.*{\.rust}/```rust/g' find src -name '*.rs' | xargs sed -i '' 's/ ~~~$/ ```/g' find src -name '*.rs' | xargs sed -i '' 's/^~~~$/ ```/g'
2013-09-23librustc: Remove `@fn` managed closures from the language.Patrick Walton-8/+24
2013-09-16switch Drop to `&mut self`Daniel Micay-3/+3
2013-09-12std: Rename {Option,Result}::chain{,_err}* to {and_then,or_else}Erick Tryzelaar-3/+3
2013-09-09auto merge of #9062 : blake2-ppc/rust/vec-iterator, r=alexcrichtonbors-1/+1
Visit the free functions of std::vec and reimplement or remove some. Most prominently, remove `each_permutation` and replace with two iterators, ElementSwaps and Permutations. Replace unzip, unzip_slice with an updated `unzip` that works with an iterator argument. Replace each_permutation with a Permutation iterator. The new permutation iterator is more efficient since it uses an algorithm that produces permutations in an order where each is only one element swap apart, including swapping back to the original state with one swap at the end. Unify the seldomly used functions `build`, `build_sized`, `build_sized_opt` into just one function `build`. Remove `equal_sizes`
2013-09-10std::at_vec and vec: Unify build_sized, build_sized_opt into buildblake2-ppc-1/+1
These functions have very few users since they are mostly replaced by iterator-based constructions. Convert a few remaining users in-tree, and reduce the number of functions by basically renaming build_sized_opt to build, and removing the other two. This for both the vec and the at_vec versions.
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-05Rename str::from_bytes to str::from_utf8, closes #8985Florian Hahn-5/+5
2013-09-04stop treating char as an integer typeDaniel Micay-7/+15
Closes #7609
2013-08-30Add missing spaceBouke van der Bijl-1/+1
2013-08-26std: Bind write() on Win64klutzy-5/+15
2013-08-22Enabled unit tests in std and extra.Vadim Chugunov-1/+0
2013-08-19Add externfn macro and correctly label fixed_stack_segmentsNiko Matsakis-6/+49
2013-08-18auto merge of #8551 : huonw/rust/speling, r=alexcrichtonbors-5/+5
(This doesn't add/remove `u`s or change `ize` to `ise`, or anything like that.)
2013-08-18More spelling corrections.Huon Wilson-1/+1
2013-08-16doc: convert remaining uses of core:: to std::.Huon Wilson-4/+4
2013-08-15Add ToCStr method .with_c_str()Kevin Ballard-5/+5
.with_c_str() is a replacement for the old .as_c_str(), to avoid unnecessary boilerplate. Replace all usages of .to_c_str().with_ref() with .with_c_str().
2013-08-12fix build with the new snapshot compilerDaniel Micay-14/+0
2013-08-06Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-1/+1
remove-str-trailing-nulls
2013-08-04Open files in binary mode. Closes #3948darkf-1/+1
2013-08-04Merge remote-tracking branch 'remotes/origin/master' into str-remove-nullErick Tryzelaar-8/+8
2013-08-04Remove trailing null from stringsErick Tryzelaar-0/+6
2013-08-04std: replace str::as_c_str with std::c_strErick Tryzelaar-7/+7
2013-08-03remove obsolete `foreach` keywordDaniel Micay-8/+8
this has been replaced by `for`
2013-08-02librustc: Disallow "unsafe" for external functionsPatrick Walton-3/+3
2013-08-01std: Replace `for` with `do { .. }` expr where internal iterators are usedblake2-ppc-8/+9
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-10/+11
2013-07-30implement pointer arithmetic with GEPDaniel Micay-1/+1
Closes #8118, #7136 ~~~rust extern mod extra; use std::vec; use std::ptr; fn bench_from_elem(b: &mut extra::test::BenchHarness) { do b.iter { let v: ~[u8] = vec::from_elem(1024, 0u8); } } fn bench_set_memory(b: &mut extra::test::BenchHarness) { do b.iter { let mut v: ~[u8] = vec::with_capacity(1024); unsafe { let vp = vec::raw::to_mut_ptr(v); ptr::set_memory(vp, 0, 1024); vec::raw::set_len(&mut v, 1024); } } } fn bench_vec_repeat(b: &mut extra::test::BenchHarness) { do b.iter { let v: ~[u8] = ~[0u8, ..1024]; } } ~~~ Before: test bench_from_elem ... bench: 415 ns/iter (+/- 17) test bench_set_memory ... bench: 85 ns/iter (+/- 4) test bench_vec_repeat ... bench: 83 ns/iter (+/- 3) After: test bench_from_elem ... bench: 84 ns/iter (+/- 2) test bench_set_memory ... bench: 84 ns/iter (+/- 5) test bench_vec_repeat ... bench: 84 ns/iter (+/- 3)
2013-07-28ReaderUtil::each_byte shouldn't include EOF byte -- Issue #5056Stepan Koltsov-4/+38
2013-07-27std and rustc: cleanup uses of result methodsErick Tryzelaar-27/+25
2013-07-27cleanup .chain and .chain_err + fixing other filesmaikklein-6/+6
2013-07-27cleanup .unwrap and .unwrap_err fixing io testsErick Tryzelaar-4/+2
2013-07-23std: remove str::to_owned and str::raw::slice_bytes_ownedErick Tryzelaar-1/+1
2013-07-23std: move StrUtil::as_c_str into StrSliceErick Tryzelaar-1/+1
2013-07-23std: remove os::as_c_charpErick Tryzelaar-14/+13
2013-07-20librustc: Remove `pub extern` and `priv extern` from the language.Patrick Walton-4/+4
Place `pub` or `priv` on individual items instead.
2013-07-17librustc: Remove the `Copy` bound from the language.Patrick Walton-3/+0
2013-07-17test: Fix tests.Patrick Walton-20/+20
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-12/+11
2013-07-08 Replaces the free-standing functions in f32, &c.Jens Nockert-2/+3
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, float, int, and uint are replaced with generic functions in num instead. If you were previously using any of those functions, just replace them with the corresponding function with the same name in num. Note: If you were using a function that corresponds to an operator, use the operator instead.
2013-07-04Convert vec::{as_imm_buf, as_mut_buf} to methods.Huon Wilson-3/+3
2013-06-30Remove vec::{map, mapi, zip_map} and the methods, except for .map, since thisHuon Wilson-1/+3
is very common, and the replacement (.iter().transform().collect()) is very ugly.
2013-06-29Removing a lot of usage of '&const'Alex Crichton-3/+3
2013-06-28librustc: Disallow "mut" from distributing over bindings.Patrick Walton-2/+5
This is the backwards-incompatible part of per-binding-site "mut".
2013-06-28Convert vec::{reserve, reserve_at_least, capacity} to methods.Huon Wilson-1/+1
2013-06-27Convert vec::[mut_]slice to methods, remove vec::const_slice.Huon Wilson-6/+5
2013-06-26Work-around 'static bound requirement in io::with_bytes_reader (note: does ↵Ben Blum-3/+10
not fix #5723, interface still unsafe)
2013-06-25Change finalize -> drop.Luqman Aden-3/+3
2013-06-23vec: remove BaseIter implementationDaniel Micay-9/+9
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
2013-06-21vec: rm old_iter implementations, except BaseIterDaniel Micay-2/+2
The removed test for issue #2611 is well covered by the `std::iterator` module itself. This adds the `count` method to `IteratorUtil` to replace `EqIter`.