diff options
| author | blake2-ppc <blake2-ppc> | 2013-09-30 20:59:46 +0200 |
|---|---|---|
| committer | blake2-ppc <blake2-ppc> | 2013-09-30 20:59:46 +0200 |
| commit | 8163cb53903dd09e920b6267eba72793394b77d0 (patch) | |
| tree | b68d1c18f17c947a08af5dcd462fac572474909c /src/rt/jemalloc/test/aligned_alloc.exp | |
| parent | 92e7bb67a8038ff73ad9dc88d8be3d3df4777282 (diff) | |
| download | rust-8163cb53903dd09e920b6267eba72793394b77d0.tar.gz rust-8163cb53903dd09e920b6267eba72793394b77d0.zip | |
std::iter: Introduce .by_ref() adaptor
Creates a wrapper around a mutable reference to the iterator. This is useful to allow applying iterator adaptors while still retaining ownership of the original iterator value. Example:: let mut xs = range(0, 10); // sum the first five values let partial_sum = xs.by_ref().take(5).fold(0, |a, b| a + b); assert!(partial_sum == 10); // xs.next() is now `5` assert!(xs.next() == Some(5));
Diffstat (limited to 'src/rt/jemalloc/test/aligned_alloc.exp')
0 files changed, 0 insertions, 0 deletions
