summary refs log tree commit diff
path: root/src/libstd/trie.rs
AgeCommit message (Collapse)AuthorLines
2013-09-15Use std::iter::range_stepblake2-ppc-16/+12
Use the iterator version instead of the old uint::/int::range_step functions.
2013-09-09rename `std::iterator` to `std::iter`Daniel Micay-1/+0
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-08-15std: Move the iterator param on FromIterator and Extendable to the method.Huon Wilson-8/+8
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-10Merge branch 'trie-bound-iters' of https://github.com/dim-an/rust into rollupErick Tryzelaar-0/+102
2013-08-10std: Rename Iterator.transform -> .mapErick Tryzelaar-2/+2
cc #5898
2013-08-10std: merge Iterator and IteratorUtilErick Tryzelaar-1/+1
2013-08-09Implement `lower_bound_iter`/`upper_bound_iter` for TrieMap/TrieSetDmitry Ermolov-0/+102
2013-08-07Implement DoubleEndedIterator on RangeKevin Ballard-14/+12
Range is now invertable as long as its element type conforms to Integer. Remove int::range_rev() et al in favor of range().invert().
2013-08-07std: Fix for-range loops that can use iteratorsblake2-ppc-2/+2
Fix inappropriate for-range loops to use for-iterator constructs (or other appropriate solution) instead.
2013-08-05Remove debug printing.Dmitry Ermolov-2/+0
2013-08-05Implemented iterator for TrieMapDmitry Ermolov-0/+96
Closes #5506.
2013-08-03auto merge of #8264 : thestinger/rust/snapshot, r=Aatchbors-8/+8
2013-08-03remove obsolete `foreach` keywordDaniel Micay-8/+8
this has been replaced by `for`
2013-08-03auto merge of #8246 : stepancheg/rust/contains-key, r=thestingerbors-6/+0
Map::contains_key can be implemented with Map::find. Remove several implementations of contains_key.
2013-08-03replace all remaining `for` with `foreach` or `do`Daniel Micay-17/+22
2013-08-03Add default implementation of Map::contains_key functionStepan Koltsov-6/+0
Map::contains_key can be implemented with Map::find. Remove several implementations of contains_key.
2013-08-02replace `range` with an external iteratorDaniel Micay-3/+3
2013-08-01std: Replace `for` with `do { .. }` expr where internal iterators are usedblake2-ppc-22/+29
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-6/+7
2013-07-30std: Implement Extendable for hashmap, str and trieblake2-ppc-9/+17
2013-07-25Added default impls for container methodsSteven Fackler-23/+0
A couple of implementations of Container::is_empty weren't exactly self.len() == 0 so I left them alone (e.g. Treemap).
2013-07-19std: Remove old magic core modBrian Anderson-1/+1
2013-07-17librustc: Remove all uses of the `Copy` bound.Patrick Walton-1/+2
2013-07-16auto merge of #7684 : ↵bors-3/+3
pnkfelix/rust/fsk-invert-range-rev-halfclosedness-issue5270-2ndpr, r=cmr Changes int/uint range_rev to iterate over range `(hi,lo]` instead of `[hi,lo)`. Fix #5270. Also: * Adds unit tests for int/uint range functions * Updates the uses of `range_rev` to account for the new semantics. (Note that pretty much all of the updates there were strict improvements to the code in question; yay!) * Exposes new function, `range_step_inclusive`, which does the range `[hi,lo]`, (at least when `hi-lo` is a multiple of the `step` parameter). * Special-cases when `|step| == 1` removing unnecessary bounds-check. (I did not check whether LLVM was already performing this optimization; I figure it would be a net win to not leave that analysis to the compiler. If reviewer objects, I can easily remove that from the refactored code.) (This pull request is a rebased version of PR #7524, which went stale due to recent unrelated changes to num libraries.)
2013-07-14auto merge of #7788 : MarkJr94/rust/from_iter, r=cmrbors-14/+66
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-2/+2
2013-07-14Implemented FromIterator for TrieMap and TrieSet=Mark Sinclair-14/+66
2013-07-13Split mutable methods out of Set and MapSteven Fackler-0/+2
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-11Fix #5270: another test I did not update properly.Felix S. Klock II-2/+2
2013-07-10Switch over to new range_rev semantics; fix #5270.Felix S. Klock II-1/+1
2013-06-29Removing a lot of usage of '&const'Alex Crichton-4/+4
2013-06-29'Borrow' stack closures rather than copying them (e.g., "|x|f(x)"), in prep ↵Ben Blum-3/+3
for making them noncopyable.
2013-06-25container: remove internal iterators from MapDaniel Micay-24/+24
the maps are being migrated to external iterators
2013-06-24remove old_iterDaniel Micay-16/+10
the `test/run-pass/class-trait-bounded-param.rs` test was xfailed and written in an ancient dialect of Rust so I've just removed it this also removes `to_vec` from DList because it's provided by `std::iter::to_vec` an Iterator implementation is added for OptVec but some transitional internal iterator methods are still left
2013-06-23vec: remove BaseIter implementationDaniel Micay-1/+1
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-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-28/+28
2013-06-09remove unused import warningsHuon Wilson-1/+0
2013-06-08std: remove each[i]_mut functions, in favour of iterators.Huon Wilson-1/+2
2013-06-01Remove all uses of `pub impl`. rs=stylePatrick Walton-10/+14
2013-05-30Remove unnecessary 'use' formsDaniel Farina-2/+0
Fix a laundry list of warnings involving unused imports that glutted up compilation output. There are more, but there seems to be some false positives (where 'remedy' appears to break the build), but this particular set of fixes seems safe.
2013-05-30Require documentation by default for libstdAlex Crichton-0/+2
Adds documentation for various things that I understand. Adds #[allow(missing_doc)] for lots of things that I don't understand.
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+4
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+548
This only changes the directory names; it does not change the "real" metadata names.