On 10/30/2011 01:53 PM, David Rajchenbach-Teller wrote:
If type `str` is indeed (at least partly) mutable, each of these
functions must copy the `str`, which is rather costly. I wonder if
there is a type-based mechanism that I could use to guarantee that a
`str` is never mutated, hopefully some trivial typestate-based pattern
that currently escapes my grasp.

For now, @str is what you want. Vector uniqueness is causing all sorts of problems, and it's possible/probable that we'll change this in the future.

Patrick

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to