As I noted below, I've now decided `unescape_entity()` should just be given a `&str` instead of an iterator, to avoid unnecessary allocation. We still need the manual loop so we can spin the iterator again. It would look something like

```rust
loop {
    let (i,b) = match iter.next() {
        None => break,
        Some(x) => x
    };
    if b == '&' as u8 {
        if last < i { try!(fmt.buf.write(pile_o_bits.slice(last, i))); }
        let start = i;
        let end = match iter.find(|&(i,b)| b == ';' as u8) {
            None => break, // Entity has no close
            Some((i,_)) => i
        };
        try!(fmt.buf.write(unescape_entity(pile_o_bits.slice(start+1, end))));
    }
}
```

Where `unescape_entity()` is now

```rust
fn unescape_entity(s: &str) -> MaybeOwned
```

and the string argument does not contain the leading `&` or trailing `;`.