]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/c_str.rs
Replace all ~"" with "".to_owned()
[rust.git] / src / libstd / c_str.rs
index a7234eeb1d5fbaa83fe5ba413993454777c58263..310bc861cd3f255999e28c62e7573257f8918f18 100644 (file)
@@ -428,6 +428,7 @@ mod tests {
     use super::*;
     use libc;
     use ptr;
+    use str::StrSlice;
 
     #[test]
     fn test_str_multistring_parsing() {
@@ -638,7 +639,7 @@ fn test_clone() {
     #[test]
     fn test_clone_noleak() {
         fn foo(f: |c: &CString|) {
-            let s = ~"test";
+            let s = "test".to_owned();
             let c = s.to_c_str();
             // give the closure a non-owned CString
             let mut c_ = c.with_ref(|c| unsafe { CString::new(c, false) } );