diff options
| author | Richo Healey <richo@psych0tik.net> | 2014-05-25 03:17:19 -0700 |
|---|---|---|
| committer | Richo Healey <richo@psych0tik.net> | 2014-05-27 12:59:31 -0700 |
| commit | 1f1b2e42d76ba1cd884adc49922636a6c2ac1b2f (patch) | |
| tree | 2a56d5ceda84c1a58796fe0fc4e7cea38a9336f6 /src/libstd/io/mod.rs | |
| parent | 4348e23b269739657d934b532ad061bfd6d92309 (diff) | |
| download | rust-1f1b2e42d76ba1cd884adc49922636a6c2ac1b2f.tar.gz rust-1f1b2e42d76ba1cd884adc49922636a6c2ac1b2f.zip | |
std: Rename strbuf operations to string
[breaking-change]
Diffstat (limited to 'src/libstd/io/mod.rs')
| -rw-r--r-- | src/libstd/io/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index c16c7737357..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)), } }) @@ -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)), } ) |
