Replace ~"string" with "string.to_owned()", except in fail!, where it was changed to "string"