about summary refs log tree commit diff
path: root/src/libextra
AgeCommit message (Collapse)AuthorLines
2013-07-29std: Rename Iterator adaptor types to drop the -Iterator suffixblake2-ppc-12/+12
Drop the "Iterator" suffix for the the structs in std::iterator. Filter, Zip, Chain etc. are shorter type names for when iterator pipelines need their types written out in full in return value types, so it's easier to read and write. the iterator module already forms enough namespace.
2013-07-28Refactored vec and str iterators to remove prefixesjmgrosen-2/+3
2013-07-28auto merge of #8069 : erickt/rust/maikklein, r=ericktbors-16/+14
Good evening, This is a superset of @MaikKlein's #7969 commit, that I've fixed up to compile. I had a couple commits I wanted to do on top of @MaikKlein's work that I didn't want to bitrot.
2013-07-27to_either + fixesErick Tryzelaar-14/+13
2013-07-27cleanup .unwrap and .unwrap_err fixing io testsErick Tryzelaar-2/+1
2013-07-27Fix nits.Steven Stewart-Gallus-8/+9
2013-07-27Change concurrency primitives to standard naming conventionsSteven Stewart-Gallus-288/+290
To be more specific: `UPPERCASETYPE` was changed to `UppercaseType` `type_new` was changed to `Type::new` `type_function(value)` was changed to `value.method()`
2013-07-27auto merge of #8074 : thestinger/rust/iterator, r=cmrbors-11/+8
d7c9bb4 r=alexcrichton 7ae17e0 r=huonw
2013-07-27Remove dummy type parameters from iterator adaptorsblake2-ppc-11/+8
With the recent fixes to method resolution, we can now remove the dummy type parameters used as crutches in the iterator module. For example, the zip adaptor type is just ZipIterator<T, U> now.
2013-07-25Added default impls for container methodsSteven Fackler-23/+1
A couple of implementations of Container::is_empty weren't exactly self.len() == 0 so I left them alone (e.g. Treemap).
2013-07-25auto merge of #8015 : msullivan/rust/default-methods, r=nikomatsakisbors-0/+24
Lots of changes to vtable resolution, handling of super/self method calls in default methods. Fix a lot of trait inheritance bugs. r? @nikomatsakis
2013-07-24auto merge of #7996 : erickt/rust/cleanup-strs, r=ericktbors-29/+29
This is a cleanup pull request that does: * removes `os::as_c_charp` * moves `str::as_buf` and `str::as_c_str` into `StrSlice` * converts some functions from `StrSlice::as_buf` to `StrSlice::as_c_str` * renames `StrSlice::as_buf` to `StrSlice::as_imm_buf` (and adds `StrSlice::as_mut_buf` to match `vec.rs`. * renames `UniqueStr::as_bytes_with_null_consume` to `UniqueStr::to_bytes` * and other misc cleanups and minor optimizations
2013-07-24rc: Use ~T for allocationblake2-ppc-47/+43
Simplify Rc<T>/RcMut<T> by using ~T when allocating a reference counted box.
2013-07-24Change 'print(fmt!(...))' to printf!/printfln! in src/lib*Birunthan Mohanathas-11/+11
2013-07-23Fix some impls such that all supertraits are actually implemented.Michael Sullivan-0/+24
2013-07-23clean up warningsErick Tryzelaar-1/+1
2013-07-23std: remove str::to_owned and str::raw::slice_bytes_ownedErick Tryzelaar-22/+22
2013-07-23std: move StrUtil::as_c_str into StrSliceErick Tryzelaar-5/+5
2013-07-23std: rename str.as_bytes_with_null_consume to str.to_bytes_with_nullErick Tryzelaar-1/+1
2013-07-23extra: rebase fallout.Graydon Hoare-1/+1
2013-07-23extra: give up trying to make more fields of context cloneable, just use ARCs.Graydon Hoare-16/+28
2013-07-23extra: switch json from hashmaps to treemapsGraydon Hoare-15/+13
2013-07-23extra: add consume iter to treemap.Graydon Hoare-0/+63
2013-07-23extra: clean up workcache to use & in place of @ most places.Graydon Hoare-58/+71
2013-07-23extra: remove a @ in workcache config.Graydon Hoare-3/+3
2013-07-23extra: change workcache::Work::unwrap to move out of self.Graydon Hoare-26/+18
2013-07-23extra: access workcache db via RWARC.Graydon Hoare-13/+17
2013-07-23extra: use deriving more in workcache, switch to treemaps.Graydon Hoare-71/+22
2013-07-23auto merge of #7944 : blake2-ppc/rust/dlist-move-nodes, r=bblumbors-138/+199
Factor out internal methods to pop/push list nodes so that .merge() and .rotate_to_front(), .rotate_to_back() (new methods) can be implemented without allocating nodes. With that, some cleanup changes to DList use of Option, and adding a missing Encodable implementation.
2013-07-23auto merge of #7934 : sfackler/rust/smallintset, r=alexcrichtonbors-369/+0
SmallIntSet is equivalent to BitvSet but with 64 times the memory overhead. There's no reason for it to exist. SmallIntSet's overhead should really only be 8 times, but for some reason, `sys::size_of::<Option<()>>() == 8`, not 1.
2013-07-22auto merge of #7703 : sfackler/rust/bitv, r=alexcrichtonbors-51/+149
Switched Bitv and BitvSet to external iterators. They still use some internal iterators internally (ha). Derived clone for all Bitv types. Removed indirection in BitvVariant. It previously held a unique pointer to the appropriate Bitv struct, even though those structs are the size of a pointer themselves. BitvVariant is the same size (16 bytes) as it was previously.
2013-07-23dlist: Rename rotate methods to .rotate_forward() and .rotate_backward()blake2-ppc-15/+15
2013-07-22std: Move change_dir_locked to unstable. #7870Brian Anderson-2/+4
2013-07-22extra: Add url moduleBrian Anderson-0/+1072
Used to be under extra::net, which no longer exists
2013-07-22extra: Remove uv, net, timer codeBrian Anderson-6324/+4
This will all be reimplemented in the new runtime.
2013-07-22dlist: Fix .peek_next() w.r.t double ended iteratorsblake2-ppc-1/+6
.peek_next() needs to check the element counter just like the .next() and .next_back() iterators do. Also clarify .insert_next() doc w.r.t double ended iteration.
2013-07-22new snapshotDaniel Micay-36/+2
2013-07-21Eliminated SmallIntSetSteven Fackler-369/+0
SmallIntSet is equivalent to BitvSet but with 8 times the memory overhead. There's no reason for it to exist.
2013-07-21dlist: Remove extraneous unwrap in .pop_back_node()blake2-ppc-3/+3
2013-07-21dlist: Use Ord for .insert_ordered()blake2-ppc-3/+2
We don't need TotalOrd for ordered insertion, just the normal sort order Ord.
2013-07-21dlist: Remove bench tests for vecblake2-ppc-37/+1
These tests for ~[] performance don't really belong here, they were for comparison.
2013-07-21dlist: Add bench test for rotate_to_{front, back}blake2-ppc-0/+19
2013-07-21auto merge of #7921 : bytewiseand/rust/smallint-iter, r=huonwbors-139/+177
Made the `iter` and `mut_iter` methods on SmallIntMap and SmallIntSet return double-ended-iterators. These iterators now implement `size_hint`. Also the iterator tests only tested dense maps/sets, which aren't very useful. So they were changed to iterate over sparse maps/sets. Fixes #7721
2013-07-21dlist: Add .rotate_to_front(), .rotate_to_back()blake2-ppc-0/+43
Add methods to move back element to front or front element to back, without reallocating nodes.
2013-07-21dlist: Factor out pop and push operations by list nodeblake2-ppc-54/+104
Factor out internal methods for pop/push ~Node<T>, This allows moving nodes instead of destructuring and allocating new. Make use of this in .merge() so that it requires no allocations when merging two DList.
2013-07-21dlist: Simplify match clauses to use Option methodsblake2-ppc-65/+33
Make the core Deque implementation a bit simpler by using Option methods when we simply map on a Some value, and deduplicate some common lines.
2013-07-21serialize: implement Encodable for DListblake2-ppc-0/+13
This impl was missing for unknown reason.
2013-07-21Added bitv iterator benchmarksSteven Fackler-0/+36
2013-07-21Added iterator testsSteven Fackler-0/+19
2013-07-21Removed unecessary indirection in BitvSteven Fackler-16/+16
BitvVariant is the same size as it was before (16 bytes).