diff options
| author | bors <bors@rust-lang.org> | 2013-09-03 06:56:05 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-09-03 06:56:05 -0700 |
| commit | 1ac8e8885bb1917f71ce432dcf181253b47f0bca (patch) | |
| tree | 35276fcd4e7a3c376c0a71123c1e77dcb160d235 /src/rt/jemalloc/test/aligned_alloc.c | |
| parent | 7048e05d5fb6aae8647494148a89bd902e5a913f (diff) | |
| parent | 7c369ee7337cee50f8ef05b9d2833e2aa30d802e (diff) | |
| download | rust-1ac8e8885bb1917f71ce432dcf181253b47f0bca.tar.gz rust-1ac8e8885bb1917f71ce432dcf181253b47f0bca.zip | |
auto merge of #8884 : blake2-ppc/rust/exact-size-hint, r=huonw
The message of the first commit explains (edited for changed trait name): The trait `ExactSize` is introduced to solve a few small niggles: * We can't reverse (`.invert()`) an enumeration iterator * for a vector, we have `v.iter().position(f)` but `v.rposition(f)`. * We can't reverse `Zip` even if both iterators are from vectors `ExactSize` is an empty trait that is intended to indicate that an iterator, for example `VecIterator`, knows its exact finite size and reports it correctly using `.size_hint()`. Only adaptors that preserve this at all times, can expose this trait further. (Where here we say finite for fitting in uint). --- It may seem complicated just to solve these small "niggles", (It's really the reversible enumerate case that's the most interesting) but only a few core iterators need to implement this trait. While we gain more capabilities generically for some iterators, it becomes a tad more complicated to figure out if a type has the right trait impls for it.
Diffstat (limited to 'src/rt/jemalloc/test/aligned_alloc.c')
0 files changed, 0 insertions, 0 deletions
