about summary refs log tree commit diff
path: root/src/libcollectionstest
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-08-14 01:06:37 +0000
committerbors <bors@rust-lang.org>2015-08-14 01:06:37 +0000
commite2bebf32fa4bc4dfe8b7cacb713091b8ccbf62bf (patch)
tree5be3aa2ddda81822d597fdcedd3d6f916ced1e52 /src/libcollectionstest
parent82b89645fb6ec31138d5788b588ddd7e44c434fa (diff)
parentbec64090a70a25c75b1856cf35dcdcf20993f8f8 (diff)
Auto merge of #27696 - bluss:into-boxed-str, r=alexcrichton
Rename String::into_boxed_slice -> into_boxed_str

This is the name that was decided in rust-lang/rfcs#1152, and it's
better if we say “boxed str” for `Box<str>`.

The old name `String::into_boxed_slice` is deprecated.
Diffstat (limited to 'src/libcollectionstest')
-rw-r--r--src/libcollectionstest/str.rs4
-rw-r--r--src/libcollectionstest/string.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libcollectionstest/str.rs b/src/libcollectionstest/str.rs
index f890e3ca2e1..69f6eb6c397 100644
--- a/src/libcollectionstest/str.rs
+++ b/src/libcollectionstest/str.rs
@@ -1204,13 +1204,13 @@ fn test_into_string() {
     // The only way to acquire a Box<str> in the first place is through a String, so just
     // test that we can round-trip between Box<str> and String.
     let string = String::from("Some text goes here");
-    assert_eq!(string.clone().into_boxed_slice().into_string(), string);
+    assert_eq!(string.clone().into_boxed_str().into_string(), string);
 }
 
 #[test]
 fn test_box_slice_clone() {
     let data = String::from("hello HELLO hello HELLO yes YES 5 中ä华!!!");
-    let data2 = data.clone().into_boxed_slice().clone().into_string();
+    let data2 = data.clone().into_boxed_str().clone().into_string();
 
     assert_eq!(data, data2);
 }
diff --git a/src/libcollectionstest/string.rs b/src/libcollectionstest/string.rs
index 80283741ccc..69553bff0e1 100644
--- a/src/libcollectionstest/string.rs
+++ b/src/libcollectionstest/string.rs
@@ -366,9 +366,9 @@ fn test_extend_ref() {
 }
 
 #[test]
-fn test_into_boxed_slice() {
+fn test_into_boxed_str() {
     let xs = String::from("hello my name is bob");
-    let ys = xs.into_boxed_slice();
+    let ys = xs.into_boxed_str();
     assert_eq!(&*ys, "hello my name is bob");
 }