about summary refs log tree commit diff
path: root/src/libstd/io.rs
AgeCommit message (Collapse)AuthorLines
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`.
2013-06-21Remove all #[cfg(stage0)]-protected codeJames Miller-3/+1
New snapshot means this can all go. Also removes places that have comments that say they are workarounds for stage0 errors.
2013-06-16Add copies to type params with Copy boundNiko Matsakis-1/+1
2013-06-15rm vec::uniq_lenDaniel Micay-1/+1
2013-06-13Revert "std: convert {vec,str}::to_owned to methods."Brian Anderson-1/+1
This fixes the strange random crashes in compile-fail tests. This reverts commit 96cd61ad034cc9e88ab6a7845c3480dbc1ea62f3. Conflicts: src/librustc/driver/driver.rs src/libstd/str.rs src/libsyntax/ext/quote.rs
2013-06-12std: unify the str -> [u8] functions as 3 methods: .as_bytes() and ↵Huon Wilson-2/+2
.as_bytes_with_null[_consume](). The first acts on &str and is not nul-terminated, the last two act on strings that are always null terminated (&'static str, ~str and @str).
2013-06-12std: convert {vec,str}::to_owned to methods.Huon Wilson-1/+1
2013-06-11fix tests, remove some warningsHuon Wilson-1/+0
2013-06-11std: replace str::{starts,ends}_with with the method.Huon Wilson-2/+2
2013-06-10std: convert str::char_at* to methods.Huon Wilson-1/+1
2013-06-10std: remove str::{len, slice, is_empty} in favour of methods.Huon Wilson-1/+1
2013-06-04librustc: Disallow multiple patterns from appearing in a "let" declaration.Patrick Walton-3/+5
You can still initialize multiple variables at once with "let (x, y) = (1, 2)".
2013-06-04std::io: Modernize some constructorsPhilipp Brüschweiler-33/+35
Part of #3853