about summary refs log tree commit diff
path: root/src/libstd/str.rs
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2014-05-01 01:32:13 -0400
committerDaniel Micay <danielmicay@gmail.com>2014-05-01 17:42:57 -0400
commit7852625b8671211125564cba69d982dd4ee5db24 (patch)
treea73c2b79a3f2c65121fa6ea7c174f300a7c72a11 /src/libstd/str.rs
parent4baff4e15f003260de0cc17f419c418332e77149 (diff)
downloadrust-7852625b8671211125564cba69d982dd4ee5db24.tar.gz
rust-7852625b8671211125564cba69d982dd4ee5db24.zip
remove leftover obsolete string literals
Diffstat (limited to 'src/libstd/str.rs')
-rw-r--r--src/libstd/str.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libstd/str.rs b/src/libstd/str.rs
index 99f1c66e702..0a60c56e57c 100644
--- a/src/libstd/str.rs
+++ b/src/libstd/str.rs
@@ -2031,12 +2031,12 @@ pub trait StrSlice<'a> {
     /// # Example
     ///
     /// ```rust
-    /// let s = ~"Do you know the muffin man,
-    /// The muffin man, the muffin man, ...";
+    /// let s = "Do you know the muffin man,
+    /// The muffin man, the muffin man, ...".to_owned();
     ///
     /// assert_eq!(s.replace("muffin man", "little lamb"),
-    ///            ~"Do you know the little lamb,
-    /// The little lamb, the little lamb, ...");
+    ///            "Do you know the little lamb,
+    /// The little lamb, the little lamb, ...".to_owned());
     ///
     /// // not found, so no change.
     /// assert_eq!(s.replace("cookie monster", "little lamb"), s);
@@ -3606,11 +3606,11 @@ mod tests {
 
     #[test]
     fn test_total_ord() {
-        "1234".cmp(& &"123") == Greater;
-        "123".cmp(& &"1234") == Less;
-        "1234".cmp(& &"1234") == Equal;
-        "12345555".cmp(& &"123456") == Less;
-        "22".cmp(& &"1234") == Greater;
+        "1234".cmp(&("123")) == Greater;
+        "123".cmp(&("1234")) == Less;
+        "1234".cmp(&("1234")) == Equal;
+        "12345555".cmp(&("123456")) == Less;
+        "22".cmp(&("1234")) == Greater;
     }
 
     #[test]
@@ -4007,7 +4007,7 @@ mod tests {
 
     #[test]
     fn test_from_str() {
-      let owned: Option<~str> = from_str(&"string");
+      let owned: Option<~str> = from_str("string");
       assert_eq!(owned, Some("string".to_owned()));
     }