@@ -21,20 +21,20 @@ use sys::stdio;
21
21
/// A handle to a raw instance of the standard input stream of this process.
22
22
///
23
23
/// This handle is not synchronized or buffered in any fashion. Constructed via
24
- /// the `std::io::stdin_raw` function.
25
- pub struct StdinRaw ( stdio:: Stdin ) ;
24
+ /// the `std::io::stdio:: stdin_raw` function.
25
+ struct StdinRaw ( stdio:: Stdin ) ;
26
26
27
27
/// A handle to a raw instance of the standard output stream of this process.
28
28
///
29
29
/// This handle is not synchronized or buffered in any fashion. Constructed via
30
- /// the `std::io::stdout_raw` function.
31
- pub struct StdoutRaw ( stdio:: Stdout ) ;
30
+ /// the `std::io::stdio:: stdout_raw` function.
31
+ struct StdoutRaw ( stdio:: Stdout ) ;
32
32
33
33
/// A handle to a raw instance of the standard output stream of this process.
34
34
///
35
35
/// This handle is not synchronized or buffered in any fashion. Constructed via
36
- /// the `std::io::stderr_raw` function.
37
- pub struct StderrRaw ( stdio:: Stderr ) ;
36
+ /// the `std::io::stdio:: stderr_raw` function.
37
+ struct StderrRaw ( stdio:: Stderr ) ;
38
38
39
39
/// Construct a new raw handle to the standard input of this process.
40
40
///
@@ -43,7 +43,7 @@ pub struct StderrRaw(stdio::Stderr);
43
43
/// handles is **not** available to raw handles returned from this function.
44
44
///
45
45
/// The returned handle has no external synchronization or buffering.
46
- pub fn stdin_raw ( ) -> StdinRaw { StdinRaw ( stdio:: Stdin :: new ( ) ) }
46
+ fn stdin_raw ( ) -> StdinRaw { StdinRaw ( stdio:: Stdin :: new ( ) ) }
47
47
48
48
/// Construct a new raw handle to the standard input stream of this process.
49
49
///
@@ -54,7 +54,7 @@ pub fn stdin_raw() -> StdinRaw { StdinRaw(stdio::Stdin::new()) }
54
54
///
55
55
/// The returned handle has no external synchronization or buffering layered on
56
56
/// top.
57
- pub fn stdout_raw ( ) -> StdoutRaw { StdoutRaw ( stdio:: Stdout :: new ( ) ) }
57
+ fn stdout_raw ( ) -> StdoutRaw { StdoutRaw ( stdio:: Stdout :: new ( ) ) }
58
58
59
59
/// Construct a new raw handle to the standard input stream of this process.
60
60
///
@@ -63,7 +63,7 @@ pub fn stdout_raw() -> StdoutRaw { StdoutRaw(stdio::Stdout::new()) }
63
63
///
64
64
/// The returned handle has no external synchronization or buffering layered on
65
65
/// top.
66
- pub fn stderr_raw ( ) -> StderrRaw { StderrRaw ( stdio:: Stderr :: new ( ) ) }
66
+ fn stderr_raw ( ) -> StderrRaw { StderrRaw ( stdio:: Stderr :: new ( ) ) }
67
67
68
68
impl Read for StdinRaw {
69
69
fn read ( & mut self , buf : & mut [ u8 ] ) -> io:: Result < usize > { self . 0 . read ( buf) }
@@ -109,9 +109,6 @@ pub struct StdinLock<'a> {
109
109
/// The `Read` trait is implemented for the returned value but the `BufRead`
110
110
/// trait is not due to the global nature of the standard input stream. The
111
111
/// locked version, `StdinLock`, implements both `Read` and `BufRead`, however.
112
- ///
113
- /// To avoid locking and buffering altogether, it is recommended to use the
114
- /// `stdin_raw` constructor.
115
112
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
116
113
pub fn stdin ( ) -> Stdin {
117
114
static INSTANCE : Lazy < Mutex < BufReader < StdinRaw > > > = lazy_init ! ( stdin_init) ;
@@ -224,9 +221,6 @@ pub struct StdoutLock<'a> {
224
221
/// provided via the `lock` method.
225
222
///
226
223
/// The returned handle implements the `Write` trait.
227
- ///
228
- /// To avoid locking and buffering altogether, it is recommended to use the
229
- /// `stdout_raw` constructor.
230
224
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
231
225
pub fn stdout ( ) -> Stdout {
232
226
static INSTANCE : Lazy < Mutex < LineWriter < StdoutRaw > > > = lazy_init ! ( stdout_init) ;
@@ -297,9 +291,6 @@ pub struct StderrLock<'a> {
297
291
/// this function. No handles are buffered, however.
298
292
///
299
293
/// The returned handle implements the `Write` trait.
300
- ///
301
- /// To avoid locking altogether, it is recommended to use the `stderr_raw`
302
- /// constructor.
303
294
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
304
295
pub fn stderr ( ) -> Stderr {
305
296
static INSTANCE : Lazy < Mutex < StderrRaw > > = lazy_init ! ( stderr_init) ;
0 commit comments