The *only* reason it's returning a `~str` is because other parts of `std` also return `~str` even when a `StrBuf` could be returned. I made this decision because it's consistent. The `unsafe` code followed from that. I did not make this decision because of an opinion on the `Vec<T>` issue.

With that said, I'm happy to change to `StrBuf`. (I'd also change the `regex-dna` benchmark to use a `StrBuf`. This would actually avoid a copy for each replacement done, so it'd probably improve performance.)

I'm not familiar with your governance model, so I'll otherwise keep quiet. But I just wanted to make sure that my point of view was clear.