diff options
| author | bors <bors@rust-lang.org> | 2013-06-22 23:07:55 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-06-22 23:07:55 -0700 |
| commit | 3b126e4d6dda1eac3881b8ca19772071997a7992 (patch) | |
| tree | b72e78c12760059cc28b9d7d88afaee2f434bf1d /src/libstd/rt | |
| parent | fc83d82fec5bc338ffa4aaf00ca2aef6bfd473a4 (diff) | |
| parent | d2e9912aea87f9b1812a0f44e093c0405848f7ce (diff) | |
| download | rust-3b126e4d6dda1eac3881b8ca19772071997a7992.tar.gz rust-3b126e4d6dda1eac3881b8ca19772071997a7992.zip | |
auto merge of #7274 : thestinger/rust/size_hint, r=huonw
I ran into a weird lifetime bug blocking updating the `collect` method to use `FromIterator`, but everything here works fine.
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/uv/net.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/rt/uv/net.rs b/src/libstd/rt/uv/net.rs index 4571747cebf..ada9aee35a7 100644 --- a/src/libstd/rt/uv/net.rs +++ b/src/libstd/rt/uv/net.rs @@ -389,7 +389,8 @@ mod test { if status.is_none() { rtdebug!("got %d bytes", nread); let buf = buf.unwrap(); - for buf.slice(0, nread as uint).each |byte| { + let r = buf.slice(0, nread as uint); + for r.iter().advance |byte| { assert!(*byte == count as u8); rtdebug!("%u", *byte as uint); count += 1; |
