about summary refs log tree commit diff
path: root/src/libstd/send_str.rs
diff options
context:
space:
mode:
authorMarvin Löbel <loebel.marvin@gmail.com>2013-10-05 21:23:24 +0200
committerMarvin Löbel <loebel.marvin@gmail.com>2013-10-05 21:28:04 +0200
commit517298de484b2a9c88689e8313bed5fde80acd79 (patch)
tree16f9b35567953a2fa86d56ffdec42ed8d493d9be /src/libstd/send_str.rs
parent49ac6baa726988c7a84dff3bdc8c1f8812940224 (diff)
downloadrust-517298de484b2a9c88689e8313bed5fde80acd79.tar.gz
rust-517298de484b2a9c88689e8313bed5fde80acd79.zip
Implemented `IntoSendStr` on `SendStr` to allow naming a
task with a `SendStr` directly
Diffstat (limited to 'src/libstd/send_str.rs')
-rw-r--r--src/libstd/send_str.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstd/send_str.rs b/src/libstd/send_str.rs
index 075c1abd25c..3ef99d48a03 100644
--- a/src/libstd/send_str.rs
+++ b/src/libstd/send_str.rs
@@ -64,6 +64,11 @@ impl IntoSendStr for &'static str {
     fn into_send_str(self) -> SendStr { SendStrStatic(self) }
 }
 
+impl IntoSendStr for SendStr {
+    #[inline]
+    fn into_send_str(self) -> SendStr { self }
+}
+
 /*
 Section: String trait impls.
 `SendStr` should behave like a normal string, so we don't derive.