about summary refs log tree commit diff
path: root/src/libextra
AgeCommit message (Collapse)AuthorLines
2013-07-16Rename Option swap_unwrap to take_unwrap. Fixes Issue#7764Austin King-14/+14
2013-07-16extra: reduce bench loop max time to 3s.Graydon Hoare-2/+2
2013-07-16extra: Add metrics functions to test.Graydon Hoare-19/+72
2013-07-16extra: add tests for test::MetricMap, MetricDiff, ratchet.Graydon Hoare-5/+105
2013-07-16Add more tests for build metadata.OGINO Masanori-0/+7
2013-07-16Update the ordering algorithm to semver 2.0.0.OGINO Masanori-13/+4
Note that Version's `le` is not "less than or equal to" now, since `lt` ignores build metadata. I think the new ordering algorithm satisfies strict weak ordering which C++ STL requires, instead of strict total ordering.
2013-07-16ringbuf: Implement DoubleEndedIteratorblake2-ppc-34/+37
2013-07-14Noting that json.rs provides parsing as wellAustin King-1/+1
2013-07-14auto merge of #7716 : kballard/rust/term-attr, r=cmrbors-9/+122
Teach `extra::term` to support more terminal attributes than just color. Fix the compiler diagnostic messages to print in bold instead of bright white. This matches Clang's output. Cache the term::Terminal instead of re-parsing for every diagnostic (fixes #6827).
2013-07-14term: Add new function .attr() to toggle terminal attributesKevin Ballard-5/+108
Also add .supports_attr() to test for attribute support without writing anything to output. Update .reset() to use sgr0 instead of op.
2013-07-14Give term.fg() and term.bg() a bool return valueKevin Ballard-4/+14
2013-07-14dlist: Use inline on very small functions and iterator functionsblake2-ppc-2/+25
2013-07-14dlist: Simplify by using Option::{map, map_mut}blake2-ppc-13/+4
These methods were fixed or just added so they can now be used.
2013-07-14ringbuf: Implement .size_hint() for iteratorsblake2-ppc-0/+15
2013-07-14auto merge of #7788 : MarkJr94/rust/from_iter, r=cmrbors-0/+74
Added Iterators for HashMap/Set, TreeMap/Set, TrieMap/Set, and PriorityQueue as per Issue #7626
2013-07-14Stripped trailing spaces; Implemented FromIterator for TreeMap and PriorityQueue=Mark Sinclair-0/+74
2013-07-14Make TLS keys actually take up spaceAlex Crichton-1/+1
If the TLS key is 0-sized, then the linux linker is apparently smart enough to put everything at the same pointer. OSX on the other hand, will reserve some space for all of them. To get around this, the TLS key now actuall consumes space to ensure that it gets a unique pointer
2013-07-14Purge the last remnants of the old TLS apiAlex Crichton-46/+15
Closes #3273
2013-07-13Split mutable methods out of Set and MapSteven Fackler-52/+61
Fixes most of #4989. I didn't add Persistent{Set,Map} since the only persistent data structure is fun_treemap and its functionality is currently too limited to build a trait out of.
2013-07-13dlist: Use a DoubleEndedIterator for .mut_iter() and .mut_rev_iter()blake2-ppc-79/+109
Unify the mutable iterators too. Switch the ListInsertion trait to use method .insert_next() and .peek_next() for list mutation. .insert_next() inserts an element into the list that will not appear in iteration, of course; so the length of the iteration can not change during iteration.
2013-07-13dlist: Use DoubleEndedIterator for .consume_rev_iter()blake2-ppc-12/+4
2013-07-13dlist: Implement DoubleEndedIterator and use for .iter() and .rev_iter()blake2-ppc-39/+33
2013-07-13dlist: Fix bug in DList::mergeblake2-ppc-11/+18
Did not properly allow runs from the `other` list to be merged in. The test case was using a wrong expected value. Edited docs for merge so they explain more clearly what it does. Also make sure insert_ordered is marked pub.
2013-07-12auto merge of #7736 : thestinger/rust/doc, r=thestingerbors-12/+11
2b96408 r=sanxiyn documents conversion, size hints and double-ended iterators and adds more of the traits to the prelude
2013-07-12Remove the global 'vec::to_owned' functionAlex Crichton-8/+7
2013-07-12auto merge of #7730 : chris-morgan/rust/bitv-eq_vec-bool, r=cmrbors-69/+67
Fixes #7711.
2013-07-12Replace owned with borrowed pointer.Chris Morgan-1/+1
As pointed out by cmr, there's no need for it to be owned there. That was also in the original scope of #7711.
2013-07-11Merge pull request #7679 from alexcrichton/consume-smallintmapDaniel Micay-1/+28
Add a `consume` method to SmallIntMap
2013-07-12extend the iterator tutorialDaniel Micay-4/+4
documents conversion, size hints and double-ended iterators and adds more of the traits to the prelude
2013-07-11auto merge of #7677 : alexcrichton/rust/tls-gc, r=pcwaltonbors-4/+4
cc #6004 and #3273 This is a rewrite of TLS to get towards not requiring `@` when using task local storage. Most of the rewrite is straightforward, although there are two caveats: 1. Changing `local_set` to not require `@` is blocked on #7673 2. The code in `local_pop` is some of the most unsafe code I've written. A second set of eyes should definitely scrutinize it... The public-facing interface currently hasn't changed, although it will have to change because `local_data::get` cannot return `Option<T>`, nor can it return `Option<&T>` (the lifetime isn't known). This will have to be changed to be given a closure which yield `&T` (or as an Option). I didn't do this part of the api rewrite in this pull request as I figured that it could wait until when `@` is fully removed. This also doesn't deal with the issue of using something other than functions as keys, but I'm looking into using static slices (as mentioned in the issues).
2013-07-11Add a `consume` method to SmallIntMapAlex Crichton-1/+28
2013-07-12Make Bitv::eq_vec take ~[bool] rather than ~[uint]Chris Morgan-69/+67
Fixes #7711.
2013-07-11auto merge of #7623 : graydon/rust/codegen-compiletests, r=pcwaltonbors-254/+508
This is some initial sketch-work for #7461 though it will depend on #7459 to be useful for anything. For the time being, just infrastructure.
2013-07-11extra: add explicit ratchet-noise-percent option to benchmark ratchet, plus ↵Graydon Hoare-26/+52
a few test breaking fixes.
2013-07-11extra: add metrics ratchet to test driver.Graydon Hoare-84/+299
2013-07-11extra: factor ConsoleTestState methods into an impl, fix perf bug.Graydon Hoare-139/+148
It was re-reading terminfo on each line of output.
2013-07-11extra: add ToJson for TreeMap.Graydon Hoare-0/+11
2013-07-11extra: simplify the bench stat loop, improve stability somewhat (?)Graydon Hoare-53/+46
2013-07-11extra: Mention extra::container::Deque trait in doc for RingBuf and DListblake2-ppc-2/+8
2013-07-11dlist: Name the type DList for doubly-linked listblake2-ppc-72/+72
2013-07-11dlist: Fix license headerblake2-ppc-0/+9
2013-07-11dlist: Implement trait Dequeblake2-ppc-22/+25
2013-07-11extra: Rename deque::Deque to ringbuf::RingBuf and impl trait Dequeblake2-ppc-205/+227
Let RingBuf have a logical name for a concrete type, and Deque is used for the Deque trait (implemented by RingBuf and dlist).
2013-07-11extra: Add mod container with trait Dequeblake2-ppc-0/+41
2013-07-11dlist: Expose ListInsertion trait with insert_before and peek_nextblake2-ppc-12/+35
An iterator that allows mutating the list is very useful but needs care to not be unsound. ListIteration exposes only insert_before (used for insert_ordered) and peek_next so far.
2013-07-11dlist: Put all tests into a tests moduleblake2-ppc-258/+256
The exception is the function check_links which needs access to struct Node (which is not pub).
2013-07-11dlist: Collect a common pattern into link_with_prev()blake2-ppc-17/+15
2013-07-11dlist: Introduce a struct Rawlink mimicing Option<T> for a raw pointerblake2-ppc-62/+73
Rawlink<T> holds a *mut T pointer and can convert itself to Option<&mut T>. The null pointer is of course None.
2013-07-11dlist: Implement size_hint properly for all iteratorsblake2-ppc-8/+23
2013-07-11dlist: A new implementation of an owned doubly-linked listblake2-ppc-906/+842
This is an owned sendable linked list which allows insertion and deletion at both ends, with fast traversal through iteration, and fast append/prepend. It is indended to replace the previous managed DList with exposed list nodes. It does not match it feature by feature, but DList could grow more methods if needed.