]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #12299 : sfackler/rust/limit-return, r=alexcrichton
authorbors <bors@rust-lang.org>
Sun, 16 Feb 2014 02:56:29 +0000 (18:56 -0800)
committerbors <bors@rust-lang.org>
Sun, 16 Feb 2014 02:56:29 +0000 (18:56 -0800)
This is useful in contexts like this:

```rust
let size = rdr.read_be_i32() as uint;
let mut limit = LimitReader::new(rdr.by_ref(), size);
let thing = read_a_thing(&mut limit);
assert!(limit.limit() == 0);
```


Trivial merge