about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2013-08-18More spelling corrections.Huon Wilson-7/+9
2013-08-16doc: convert remaining uses of core:: to std::.Huon Wilson-21/+21
2013-08-16doc: correct spelling in documentation.Huon Wilson-30/+29
2013-08-15vec: rm redundant is_empty implementationsDaniel Micay-12/+0
2013-08-15iterator: cleanupDaniel Micay-4/+3
2013-08-15vec: rm obsolete zip and zip_sliceDaniel Micay-41/+1
These are obsoleted by the generic iterator `zip` adaptor. Unlike these, it does not clone the elements or allocate a new vector by default.
2013-08-15tuple: remove obsolete ExtendedTupleOpsDaniel Micay-53/+1
replaced by iterators (generic composable `map` and `zip` adaptors)
2013-08-15kinds: update documentationDaniel Micay-9/+3
2013-08-15ptr: inline the Clone implementationDaniel Micay-0/+1
2013-08-15auto merge of #8485 : alexcrichton/rust/add-tests, r=catamorphismbors-1/+1
Closes #3907 Closes #5493 Closes #4464 Closes #4759 Closes #5666 Closes #5884 Closes #5926 Closes #6318 Closes #6557 Closes #6898 Closes #6919 Closes #7222
2013-08-15Fix a typo in the ifmt doxAlex Crichton-1/+1
2013-08-15auto merge of #8515 : kballard/rust/saturating-checked, r=thestingerbors-38/+25
r? @thestinger
2013-08-15auto merge of #8491 : robertknight/rust/7722-reservoir_sampling, r=graydonbors-0/+56
Fixes #7722 I had a couple of queries: - Should this return an array or an iterator? - Should this be a method on iterators or on the rng? I implemented it in RngUtils as it seemed to belong with shuffle().
2013-08-15auto merge of #8490 : huonw/rust/fromiterator-extendable, r=catamorphismbors-29/+29
If they are on the trait then it is extremely annoying to use them as generic parameters to a function, e.g. with the iterator param on the trait itself, if one was to pass an Extendable<int> to a function that filled it either from a Range or a Map<VecIterator>, one needs to write something like: fn foo<E: Extendable<int, Range<int>> + Extendable<int, Map<&'self int, int, VecIterator<int>>> (e: &mut E, ...) { ... } since using a generic, i.e. `foo<E: Extendable<int, I>, I: Iterator<int>>` means that `foo` takes 2 type parameters, and the caller has to specify them (which doesn't work anyway, as they'll mismatch with the iterators used in `foo` itself). This patch changes it to: fn foo<E: Extendable<int>>(e: &mut E, ...) { ... }
2013-08-14auto merge of #8481 : cmr/rust/bench/std/at_vec, r=graydonbors-0/+81
2013-08-14Rewrite Saturating in terms of CheckedAdd/CheckedSubKevin Ballard-38/+25
2013-08-14auto merge of #8452 : Kimundi/rust/stuff02, r=bstriebors-47/+88
- Methodyfied the string ascii extionsion functions - They got added recently, I wrapped them in a trait. - Added `into_owned()` method for vectors - similar to `Str`'s `into_owned()` function, allows to convert to a owned vector without making a copy if the source is a owned vector. - Added `or_some` method to option - similar to `unwrap_or_default`, but keeps the values wrapped in an `Option`. Useful for `Option` chains, eg Iterator impls. - Added `DoubleEndedIterator` impl to `Option` - Just for compatibility with generic Iterator functions. - Renamed nil.rs to unit.rs - the type got renamed ages ago, it's time the source file is as well.
2013-08-15std: Move the iterator param on FromIterator and Extendable to the method.Huon Wilson-29/+29
If they are on the trait then it is extremely annoying to use them as generic parameters to a function, e.g. with the iterator param on the trait itself, if one was to pass an Extendable<int> to a function that filled it either from a Range or a Map<VecIterator>, one needs to write something like: fn foo<E: Extendable<int, Range<int>> + Extendable<int, Map<&'self int, int, VecIterator<int>>> (e: &mut E, ...) { ... } since using a generic, i.e. `foo<E: Extendable<int, I>, I: Iterator<int>>` means that `foo` takes 2 type parameters, and the caller has to specify them (which doesn't work anyway, as they'll mismatch with the iterators used in `foo` itself). This patch changes it to: fn foo<E: Extendable<int>>(e: &mut E, ...) { ... }
2013-08-14Methodyfied the string ascii extionsion functionsMarvin Löbel-47/+88
Added into_owned() method for vectors Added DoubleEnded Iterator impl to Option Renamed nil.rs to unit.rs
2013-08-14auto merge of #8439 : huonw/rust/hashset-clone, r=cmrbors-0/+26
Closes #5581.
2013-08-13auto merge of #8446 : alexcrichton/rust/ifmt++, r=graydonbors-117/+622
This includes a number of improvements to `ifmt!` * Implements formatting arguments -- `{:0.5x}` works now * Formatting now works on all integer widths, not just `int` and `uint` * Added a large doc block to `std::fmt` which should help explain what `ifmt!` is all about * Added floating point formatters, although they have the same pitfalls from before (they're just proof-of-concept now) Closed a couple of issues along the way, yay! Once this gets into a snapshot, I'll start looking into removing all of `fmt`
2013-08-13Add `f` formats to `ifmt!`Alex Crichton-1/+33
Currently the work just the same as the old `extfmt` versions
2013-08-13auto merge of #8475 : kmcallister/rust/stack_segment, r=brson,brsonbors-2/+2
Servo needs to tell SpiderMonkey about the stack bounds. r? @brson
2013-08-13Make rt::stack publicKeegan McAllister-1/+1
Fixes #8478.
2013-08-13auto merge of #8423 : alexcrichton/rust/less-priv-again, r=bstriebors-30/+30
Closes #5495
2013-08-13Add RngUtils::sample() method for reservoir sampling from iteratorsRobert Knight-0/+56
2013-08-13auto merge of #8411 : bblum/rust/assorted-fixes, r=brsonbors-479/+469
Each commit is pretty much what it says on the tin. r anybody.
2013-08-12auto merge of #8487 : brson/rust/local-opts, r=brsonbors-16/+24
I did this once but acciddentally undid it in a later patch.
2013-08-12Forbid pub/priv where it has no effectAlex Crichton-30/+30
Closes #5495
2013-08-12Explain what ifmt! is all aboutAlex Crichton-0/+301
2013-08-12Correct the padding on integer types for formattingAlex Crichton-43/+63
2013-08-12Define integer formats for all widthsAlex Crichton-37/+56
Closes #1653
2013-08-12Implement formatting arguments for strings and integersAlex Crichton-63/+196
Closes #1651
2013-08-12std: Re-optimize tls access on local allocation pathBrian Anderson-16/+24
I did this once but acciddentally undid it in a later patch.
2013-08-12auto merge of #8476 : thestinger/rust/snapshot, r=brsonbors-599/+16
2013-08-12std::at_vec: add benchmarksCorey Richardson-0/+81
2013-08-12auto merge of #8419 : cmr/rust/fix-rtdebug, r=brsonbors-12/+4
It now actually does logging, and is compiled out when `--cfg rtdebug` is not given to the libstd build, which it isn't by default. This makes the rt benchmarks 18-50% faster.
2013-08-12fix build with the new snapshot compilerDaniel Micay-599/+16
2013-08-12rt::task: Make current_stack_segment publicKeegan McAllister-1/+1
Servo needs to tell SpiderMonkey about the stack bounds.
2013-08-12Clean up transitionary glue in task/spawn.rs. Don't hold kill-little-lock ↵Ben Blum-138/+69
for O(n) time, cf #3100, and optimize out several unneeded clone()s.
2013-08-12auto merge of #8400 : blake2-ppc/rust/seq-ord, r=cmrbors-70/+247
Use Eq + Ord for lexicographical ordering of sequences. For each of <, <=, >= or > as R, use:: [x, ..xs] R [y, ..ys] = if x != y { x R y } else { xs R ys } Previous code using `a < b` and then `!(b < a)` for short-circuiting fails on cases such as [1.0, 2.0] < [0.0/0.0, 3.0], where the first element was effectively considered equal. Containers like &[T] did also implement only one comparison operator `<`, and derived the comparison results from this. This isn't correct either for Ord. Implement functions in `std::iterator::order::{lt,le,gt,ge,equal,cmp}` that all iterable containers can use for lexical order. We also visit tuple ordering, having the same problem and same solution (but differing implementation).
2013-08-12Fix select() in light of the deschedule...and then race. Close #8347.Ben Blum-1/+23
2013-08-12Make cell with_ref/with_mut_ref use finally. Close #7975.Ben Blum-8/+8
2013-08-12Reorganise Select traits to not expose internal runtime types. Close #5160. ↵Ben Blum-313/+348
Pending #8215.
2013-08-12Don't use unkillable in UnsafeArc dtor when there's no unwrapper. Close #8382.Ben Blum-19/+21
2013-08-12auto merge of #8428 : blake2-ppc/rust/peekable-iterators, r=thestingerbors-19/+92
Peekable changes by @SimonSapin and original PR is #8396
2013-08-11auto merge of #8455 : nikomatsakis/rust/issue-5762-objects-dralston-d, r=graydonbors-1/+47
Fix #5762 and various other aspects of object invocation. r? @graydon
2013-08-11Update type visitor to use &Visitor and not @VisitorNiko Matsakis-0/+28
2013-08-11Add a field `borrow_offset` to the type descriptor indicatingNiko Matsakis-1/+19
what amount a T* pointer must be adjusted to reach the contents of the box. For `~T` types, this requires knowing the type `T`, which is not known in the case of objects.
2013-08-11auto merge of #8412 : thestinger/rust/vector-add, r=alexcrichtonbors-16/+44