crabtw/rust-bindgen — pull request #74 by riccieri (2014-05-02 19:31:59+00:00)
Title: Fix build on 0.11pre: Change ~"foo" to "foo".to_owned()

[`~"string"` and `&"string"` literals are gone](https://github.com/mozilla/rust/pull/13877), and were replaced by `"string".to_owned()` and just `"string"`, respectively. This commit was made by a simple `sed` to convert the existing instances of `~"string"` on the codebase.

For reference, the command used was this:

sed -e 's/~\("[^"]*"\)/\1.to_owned()/g' -i *.rs

That wouldn't work if for strings that contain the `\"` escape in them, but this codebase had none.

Similar work is likely to be necessary after [`~T` is substituted by `Box`](https://github.com/mozilla/rust/issues/13885).