summary refs log tree commit diff
path: root/src/libextra/smallintmap.rs
AgeCommit message (Collapse)AuthorLines
2013-09-09rename `std::iterator` to `std::iter`Daniel Micay-1/+1
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-10std: merge Iterator and IteratorUtilErick Tryzelaar-1/+1
2013-08-10Mass rename of .consume{,_iter}() to .move_iter()Erick Tryzelaar-5/+5
cc #7887
2013-08-07std: Fix for-range loops that can use iteratorsblake2-ppc-8/+6
Fix inappropriate for-range loops to use for-iterator constructs (or other appropriate solution) instead.
2013-08-07extra: Remove all .each methods in smallintmapblake2-ppc-43/+0
2013-08-07core: option.map_consume -> option.map_moveErick Tryzelaar-1/+1
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-3/+3
- Made naming schemes consistent between Option, Result and Either - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None) - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-03auto merge of #8264 : thestinger/rust/snapshot, r=Aatchbors-6/+6
2013-08-03remove obsolete `foreach` keywordDaniel Micay-6/+6
this has been replaced by `for`
2013-08-03auto merge of #8246 : stepancheg/rust/contains-key, r=thestingerbors-5/+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-4/+3
2013-08-03Add default implementation of Map::contains_key functionStepan Koltsov-5/+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-5/+5
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-3/+3
2013-07-29std: Rename Iterator adaptor types to drop the -Iterator suffixblake2-ppc-5/+5
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-27auto merge of #8074 : thestinger/rust/iterator, r=cmrbors-5/+3
d7c9bb4 r=alexcrichton 7ae17e0 r=huonw
2013-07-27Remove dummy type parameters from iterator adaptorsblake2-ppc-5/+3
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-3/+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-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-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-20auto merge of #7912 : graydon/rust/extra-new-benchmarks-1, r=catamorphismbors-1/+60
This adds new #[bench] benchmarks for extra::smallintmap, treemap, sha1, sha256 and 512, and base64. Also fixes a bunch of warnings in bitv.
2013-07-20Use Option .take() or .take_unwrap() instead of util::replace where possibleblake2-ppc-1/+1
2013-07-20smallint{map,set}: replace iterators with DoubleEndedIteratorAndreas Martens-139/+177
Also changed the tests to iterate over sparse maps/sets.
2013-07-19extra: add some microbenchmarksGraydon Hoare-1/+60
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-2/+2
2013-07-16auto merge of #7684 : ↵bors-2/+2
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-13Split mutable methods out of Set and MapSteven Fackler-10/+13
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-11Add a `consume` method to SmallIntMapAlex Crichton-1/+28
2013-07-10Switch over to new range_rev semantics; fix #5270.Felix S. Klock II-2/+2
2013-07-06Added external iterators for SmallIntMap and SmallIntSet=Mark Sinclair-0/+287
Adding iterators for extra::smallintmap Working on mutability error Ran into ICE More mutability problems Working through mutability issue working on getting tests passing SmallIntMa tests passing Added SmallIntSet iterators, and the tests are passing Stripped trailing spaces Removed extra use directive
2013-06-30Convert vec::{grow, grow_fn, grow_set} to methods.Huon Wilson-2/+1
2013-06-30Convert vec::{rposition, rposition_elem, position_elem, contains} to methods.Huon Wilson-6/+4
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-9/+6
2013-06-25container: remove internal iterators from MapDaniel Micay-32/+32
the maps are being migrated to external iterators
2013-06-24remove old_iterDaniel Micay-10/+7
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-16Add copies to type params with Copy boundNiko Matsakis-1/+1
2013-06-16auto merge of #7123 : huonw/rust/more-str, r=thestingerbors-5/+0
Moves all the remaining functions that could reasonably be methods to be methods, except for some FFI ones (which I believe @erickt is working on, possibly) and `each_split_within`, since I'm not really sure the details of it (I believe @kimundi wrote the current implementation, so maybe he could convert it to an external iterator method on `StrSlice`, e.g. `word_wrap_iter(&self) -> WordWrapIterator<'self>`, where `WordWrapIterator` impls `Iterator<&'self str>`. It probably won't be too hard, since it's already a state machine.) This also cleans up the comparison impls for the string types, except I'm not sure how the lang items `eq_str` and `eq_str_uniq` need to be handled, so they (`eq_slice` and `eq`) remain stand-alone functions.
2013-06-16remove unused importsHuon Wilson-5/+0
2013-06-15rm vec::uniq_lenDaniel Micay-5/+5
2013-06-01Remove all uses of `pub impl`. rs=stylePatrick Walton-10/+13
2013-05-30libextra: Require documentation by defaultAlex Crichton-0/+4
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-1/+10
2013-05-28Fix #6696Jihyun Yu-2/+16
2013-05-23libextra: Add missing core::prelude import. rs=burningtreePatrick Walton-0/+2
2013-05-22test: Update tests and import the prelude in some more places.Patrick Walton-0/+2
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-0/+2
to libextra
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+516
This only changes the directory names; it does not change the "real" metadata names.