| Age | Commit message (Collapse) | Author | Lines |
|
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.
|
|
|
|
cc #7887
|
|
Fix inappropriate for-range loops to use for-iterator constructs (or
other appropriate solution) instead.
|
|
|
|
|
|
- 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
|
|
|
|
this has been replaced by `for`
|
|
Map::contains_key can be implemented with Map::find.
Remove several implementations of contains_key.
|
|
|
|
Map::contains_key can be implemented with Map::find.
Remove several implementations of contains_key.
|
|
|
|
|
|
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.
|
|
|
|
d7c9bb4 r=alexcrichton
7ae17e0 r=huonw
|
|
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.
|
|
A couple of implementations of Container::is_empty weren't exactly
self.len() == 0 so I left them alone (e.g. Treemap).
|
|
SmallIntSet is equivalent to BitvSet but with 8 times the memory
overhead. There's no reason for it to exist.
|
|
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
|
|
This adds new #[bench] benchmarks for extra::smallintmap, treemap, sha1, sha256 and 512, and base64. Also fixes a bunch of warnings in bitv.
|
|
|
|
Also changed the tests to iterate over sparse maps/sets.
|
|
|
|
|
|
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.)
|
|
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.
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
the maps are being migrated to external iterators
|
|
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
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
to libextra
|
|
This only changes the directory names; it does not change the "real"
metadata names.
|