diff options
| author | bors <bors@rust-lang.org> | 2014-05-27 17:46:48 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-05-27 17:46:48 -0700 |
| commit | 911cc9c35234ab12a4b9a6fc1cb35b52556f242d (patch) | |
| tree | f434006eca9cc58dd01c2a033c505d606d2fced2 /src/libstd/io/mod.rs | |
| parent | 30bf73fd789ad1414284f59b005e85304ff963ad (diff) | |
| parent | c256dcf8b66fb7100e2d735d6640cf76cb2d22f5 (diff) | |
| download | rust-911cc9c35234ab12a4b9a6fc1cb35b52556f242d.tar.gz rust-911cc9c35234ab12a4b9a6fc1cb35b52556f242d.zip | |
auto merge of #14414 : richo/rust/features/nerf_unused_string_fns, r=alexcrichton
This should block on #14323
Diffstat (limited to 'src/libstd/io/mod.rs')
| -rw-r--r-- | src/libstd/io/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index c22bc92fb65..4d02a470f30 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -496,7 +496,7 @@ pub trait Reader { fn read_at_least(&mut self, min: uint, buf: &mut [u8]) -> IoResult<uint> { if min > buf.len() { return Err(IoError { - detail: Some("the buffer is too short".to_strbuf()), + detail: Some("the buffer is too short".to_string()), ..standard_error(InvalidInput) }); } @@ -564,7 +564,7 @@ pub trait Reader { fn push_at_least(&mut self, min: uint, len: uint, buf: &mut Vec<u8>) -> IoResult<uint> { if min > len { return Err(IoError { - detail: Some("the buffer is too short".to_strbuf()), + detail: Some("the buffer is too short".to_string()), ..standard_error(InvalidInput) }); } @@ -635,7 +635,7 @@ pub trait Reader { fn read_to_str(&mut self) -> IoResult<String> { self.read_to_end().and_then(|s| { match str::from_utf8(s.as_slice()) { - Some(s) => Ok(s.to_strbuf()), + Some(s) => Ok(s.to_string()), None => Err(standard_error(InvalidInput)), } }) @@ -1315,7 +1315,7 @@ pub trait Buffer: Reader { /// use std::io; /// /// let mut reader = io::stdin(); - /// let input = reader.read_line().ok().unwrap_or("nothing".to_owned()); + /// let input = reader.read_line().ok().unwrap_or("nothing".to_string()); /// ``` /// /// # Error @@ -1333,7 +1333,7 @@ pub trait Buffer: Reader { fn read_line(&mut self) -> IoResult<String> { self.read_until('\n' as u8).and_then(|line| match str::from_utf8(line.as_slice()) { - Some(s) => Ok(s.to_strbuf()), + Some(s) => Ok(s.to_string()), None => Err(standard_error(InvalidInput)), } ) |
