about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorOGINO Masanori <masanori.ogino@gmail.com>2014-06-27 05:22:26 +0900
committerOGINO Masanori <masanori.ogino@gmail.com>2014-06-27 07:10:33 +0900
commitdfef4220242227fb210e58eedc91bcc74de8921f (patch)
tree0eb21e33da14b44ca99e2b78f17045f83fd73718 /src/libstd
parentb20f968ed2a4808f98ffce52ce95398009565ece (diff)
downloadrust-dfef4220242227fb210e58eedc91bcc74de8921f.tar.gz
rust-dfef4220242227fb210e58eedc91bcc74de8921f.zip
std::io: Use re-exported pathes in examples.
We use re-exported pathes (e.g. std::io::Command) and original ones
(e.g. std::io::process::Command) together in examples now. Using
re-exported ones consistently avoids confusion.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io/mod.rs2
-rw-r--r--src/libstd/io/net/tcp.rs6
-rw-r--r--src/libstd/io/process.rs4
-rw-r--r--src/libstd/io/timer.rs8
4 files changed, 10 insertions, 10 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index 1d6ad7c31e2..8014759c88a 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -83,7 +83,7 @@ Some examples of obvious things you might want to do
 
     ```rust
     # #![allow(unused_must_use)]
-    use std::io::net::tcp::TcpStream;
+    use std::io::TcpStream;
 
     # // connection doesn't fail if a server is running on 8080
     # // locally, we still want to be type checking this code, so lets
diff --git a/src/libstd/io/net/tcp.rs b/src/libstd/io/net/tcp.rs
index 7d6ab9d7419..b79e831ff61 100644
--- a/src/libstd/io/net/tcp.rs
+++ b/src/libstd/io/net/tcp.rs
@@ -41,7 +41,7 @@ use rt::rtio;
 ///
 /// ```no_run
 /// # #![allow(unused_must_use)]
-/// use std::io::net::tcp::TcpStream;
+/// use std::io::TcpStream;
 ///
 /// let mut stream = TcpStream::connect("127.0.0.1", 34254);
 ///
@@ -162,7 +162,7 @@ impl TcpStream {
     /// ```no_run
     /// # #![allow(unused_must_use)]
     /// use std::io::timer;
-    /// use std::io::net::tcp::TcpStream;
+    /// use std::io::TcpStream;
     ///
     /// let mut stream = TcpStream::connect("127.0.0.1", 34254).unwrap();
     /// let stream2 = stream.clone();
@@ -406,7 +406,7 @@ impl TcpAcceptor {
     ///
     /// ```no_run
     /// # #![allow(experimental)]
-    /// use std::io::net::tcp::TcpListener;
+    /// use std::io::TcpListener;
     /// use std::io::{Listener, Acceptor, TimedOut};
     ///
     /// let mut a = TcpListener::bind("127.0.0.1", 8482).listen().unwrap();
diff --git a/src/libstd/io/process.rs b/src/libstd/io/process.rs
index ecd6693990c..8e1747146e4 100644
--- a/src/libstd/io/process.rs
+++ b/src/libstd/io/process.rs
@@ -476,8 +476,8 @@ impl Process {
     ///
     /// ```no_run
     /// # #![allow(experimental)]
-    /// use std::io::process::{Command, ProcessExit};
-    /// use std::io::IoResult;
+    /// use std::io::{Command, IoResult};
+    /// use std::io::process::ProcessExit;
     ///
     /// fn run_gracefully(prog: &str) -> IoResult<ProcessExit> {
     ///     let mut p = try!(Command::new("long-running-process").spawn());
diff --git a/src/libstd/io/timer.rs b/src/libstd/io/timer.rs
index 9ae855536ac..432461c4606 100644
--- a/src/libstd/io/timer.rs
+++ b/src/libstd/io/timer.rs
@@ -110,7 +110,7 @@ impl Timer {
     /// # Example
     ///
     /// ```rust
-    /// use std::io::timer::Timer;
+    /// use std::io::Timer;
     ///
     /// let mut timer = Timer::new().unwrap();
     /// let ten_milliseconds = timer.oneshot(10);
@@ -122,7 +122,7 @@ impl Timer {
     /// ```
     ///
     /// ```rust
-    /// use std::io::timer::Timer;
+    /// use std::io::Timer;
     ///
     /// // Incorrect, method chaining-style:
     /// let mut five_ms = Timer::new().unwrap().oneshot(5);
@@ -152,7 +152,7 @@ impl Timer {
     /// # Example
     ///
     /// ```rust
-    /// use std::io::timer::Timer;
+    /// use std::io::Timer;
     ///
     /// let mut timer = Timer::new().unwrap();
     /// let ten_milliseconds = timer.periodic(10);
@@ -170,7 +170,7 @@ impl Timer {
     /// ```
     ///
     /// ```rust
-    /// use std::io::timer::Timer;
+    /// use std::io::Timer;
     ///
     /// // Incorrect, method chaining-style.
     /// let mut five_ms = Timer::new().unwrap().periodic(5);