We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 24055d0 commit dfcca54Copy full SHA for dfcca54
src/libcollections/string.rs
@@ -1866,6 +1866,22 @@ impl ToString for str {
1866
}
1867
1868
1869
+#[stable(feature = "cow_str_to_string_specialization", since = "1.17.0")]
1870
+impl<'a> ToString for Cow<'a, str> {
1871
+ #[inline]
1872
+ fn to_string(&self) -> String {
1873
+ self[..].to_owned()
1874
+ }
1875
+}
1876
+
1877
+#[stable(feature = "string_to_string_specialization", since = "1.17.0")]
1878
+impl ToString for String {
1879
1880
1881
+ self.to_owned()
1882
1883
1884
1885
#[stable(feature = "rust1", since = "1.0.0")]
1886
impl AsRef<str> for String {
1887
#[inline]
0 commit comments