]> git.lizzy.rs Git - rust.git/commitdiff
Implement PartialEq<str> for String and Cow
authorGleb Kozyrev <gleb@gkoz.com>
Thu, 2 Apr 2015 15:51:14 +0000 (18:51 +0300)
committerGleb Kozyrev <gleb@gkoz.com>
Thu, 2 Apr 2015 15:53:04 +0000 (18:53 +0300)
src/libcollections/string.rs

index bce314b6e04a90ffc1460b65935623b18bebe603..8da8cad98a70545df1d24dc7703218de87e7d99c 100644 (file)
@@ -822,7 +822,9 @@ fn ne(&self, other: &$lhs) -> bool { PartialEq::ne(&self[..], &other[..]) }
     }
 }
 
+impl_eq! { String, str }
 impl_eq! { String, &'a str }
+impl_eq! { Cow<'a, str>, str }
 impl_eq! { Cow<'a, str>, String }
 
 #[stable(feature = "rust1", since = "1.0.0")]