about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-11-15 23:57:54 +1100
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-11-16 12:41:55 +1100
commit59abf75d9e810f2a88c6dd0f37cfcbd6989a6446 (patch)
treea3ee597b66f94ea16e11e1c4fb6ce56dc571068a /src/libcollections
parent2d8ca045d6d143819fe386bff37ff7ecb0e380d0 (diff)
downloadrust-59abf75d9e810f2a88c6dd0f37cfcbd6989a6446.tar.gz
rust-59abf75d9e810f2a88c6dd0f37cfcbd6989a6446.zip
Move IntoString to collections::string
Diffstat (limited to 'src/libcollections')
-rw-r--r--src/libcollections/string.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs
index c1e093436c3..b5ed7e6a077 100644
--- a/src/libcollections/string.rs
+++ b/src/libcollections/string.rs
@@ -802,6 +802,12 @@ impl FromStr for String {
     }
 }
 
+/// Trait for converting a type to a string, consuming it in the process.
+pub trait IntoString {
+    /// Consume and convert to a string.
+    fn into_string(self) -> String;
+}
+
 /// Unsafe operations
 #[unstable = "waiting on raw module conventions"]
 pub mod raw {