]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/class-exports.rs
test: Remove all uses of `~str` from the test suite.
[rust.git] / src / test / run-pass / class-exports.rs
index 96270577ce2b9389881d44270e8bbe32d5e9f1af..a7039ca708d9669a6baafb8ea6cfa1015aabbbf4 100644 (file)
 mod kitty {
     pub struct cat {
         meows: uint,
-        name: ~str,
+        name: StrBuf,
     }
 
     impl cat {
-        pub fn get_name(&self) -> ~str { self.name.clone() }
+        pub fn get_name(&self) -> StrBuf { self.name.clone() }
     }
 
-    pub fn cat(in_name: ~str) -> cat {
+    pub fn cat(in_name: StrBuf) -> cat {
         cat {
             name: in_name,
             meows: 0u
@@ -33,5 +33,6 @@ pub fn cat(in_name: ~str) -> cat {
 }
 
 pub fn main() {
-  assert_eq!(cat("Spreckles".to_owned()).get_name(), "Spreckles".to_owned());
+  assert_eq!(cat("Spreckles".to_strbuf()).get_name(),
+                 "Spreckles".to_strbuf());
 }