about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-02-15 18:26:58 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-02-15 18:26:58 +0530
commita2bc3a252ce9ade1b78d139383feaba685c000f4 (patch)
treececc956a29b67e0073a531c709636259f80b2e3f /src/libstd
parentcff0b78ce7a46daf2e6f8de16273ef2e10b6fea6 (diff)
parent805a31fb760873d3b973699403866ca08e8999ca (diff)
downloadrust-a2bc3a252ce9ade1b78d139383feaba685c000f4.tar.gz
rust-a2bc3a252ce9ade1b78d139383feaba685c000f4.zip
Rollup merge of #22268 - steveklabnik:improve_wait, r=nikomatsakis
 Remove incorrect claim, add example, reformat and re-word.

Fixes #22266
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/sync/mpsc/select.rs15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/libstd/sync/mpsc/select.rs b/src/libstd/sync/mpsc/select.rs
index babae93b2d4..87b2fe8f100 100644
--- a/src/libstd/sync/mpsc/select.rs
+++ b/src/libstd/sync/mpsc/select.rs
@@ -111,11 +111,18 @@ pub trait Packet {
 }
 
 impl Select {
-    /// Creates a new selection structure. This set is initially empty and
-    /// `wait` will panic!() if called.
+    /// Creates a new selection structure. This set is initially empty.
     ///
-    /// Usage of this struct directly can sometimes be burdensome, and usage is
-    /// rather much easier through the `select!` macro.
+    /// Usage of this struct directly can sometimes be burdensome, and usage is much easier through
+    /// the `select!` macro.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::sync::mpsc::Select;
+    ///
+    /// let select = Select::new();
+    /// ```
     pub fn new() -> Select {
         Select {
             head: ptr::null_mut(),