about summary refs log tree commit diff
path: root/src/libstd/io.rs
AgeCommit message (Collapse)AuthorLines
2013-10-24Remove std::io once and for all!Alex Crichton-1817/+0
2013-10-24Remove even more of std::ioAlex Crichton-374/+10
Big fish fried here: extra::json most of the compiler extra::io_util removed extra::fileinput removed Fish left to fry extra::ebml
2013-10-23Removed unnecessary comments and white spaces as suggestedreedlepee-3/+3
2013-10-23Removed Unnecessary comments and white spaces #4386reedlepee-6/+0
2013-10-23Making fields in std and extra : private #4386reedlepee-6/+12
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-17/+17
Who doesn't like a massive renaming?
2013-10-15path2: Remove .with_display_str and friendsKevin Ballard-2/+3
Rewrite these methods as methods on Display and FilenameDisplay. This turns do path.with_display_str |s| { ... } into do path.display().with_str |s| { ... }
2013-10-15path2: Adjust the API to remove all the _str mutation methodsKevin Ballard-12/+12
Add a new trait BytesContainer that is implemented for both byte vectors and strings. Convert Path::from_vec and ::from_str to one function, Path::new(). Remove all the _str-suffixed mutation methods (push, join, with_*, set_*) and modify the non-suffixed versions to use BytesContainer.
2013-10-15path2: Replace the path module outrightKevin Ballard-17/+18
Remove the old path. Rename path2 to path. Update all clients for the new path. Also make some miscellaneous changes to the Path APIs to help the adoption process.
2013-10-14Removing ccdeclSteve Klabnik-1/+1
as per https://github.com/mozilla/rust/pull/9606#discussion_r6930872
2013-10-14Remove unused abi attributes.Steve Klabnik-2/+1
They've been replaced by putting the name on the extern block. #[abi = "foo"] goes to extern "foo" { } Closes #9483.
2013-10-10Remove usage of io::FILE_writerAlex Crichton-37/+0
2013-10-01Migrate users of 'loop' to 'continue'Alex Crichton-1/+1
Closes #9467
2013-09-30std: Remove usage of fmt!Alex Crichton-22/+19
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.