diff options
| author | bors <bors@rust-lang.org> | 2014-03-22 00:56:47 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-03-22 00:56:47 -0700 |
| commit | 092afdba3c81d122b4b24aa49dd445023b5daef6 (patch) | |
| tree | 4f3abfd529e1fedb998bb48351a39c7b8be3b548 /src/libterm/terminfo | |
| parent | 993dee4f1421cceddbb434e04826d1359a9c8512 (diff) | |
| parent | 811257eda5edd7d7d9586a9be4f45a2d4dfa4701 (diff) | |
| download | rust-092afdba3c81d122b4b24aa49dd445023b5daef6.tar.gz rust-092afdba3c81d122b4b24aa49dd445023b5daef6.zip | |
auto merge of #12907 : alexcrichton/rust/issue-12892, r=brson
These methods can be mistaken for general "read some bytes" utilities when they're actually only meant for reading an exact number of bytes. By renaming them it's much clearer about what they're doing without having to read the documentation. Closes #12892
Diffstat (limited to 'src/libterm/terminfo')
| -rw-r--r-- | src/libterm/terminfo/parser/compiled.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libterm/terminfo/parser/compiled.rs b/src/libterm/terminfo/parser/compiled.rs index e6a1dc70b70..db615aaad62 100644 --- a/src/libterm/terminfo/parser/compiled.rs +++ b/src/libterm/terminfo/parser/compiled.rs @@ -207,7 +207,7 @@ pub fn parse(file: &mut io::Reader, } // don't read NUL - let bytes = try!(file.read_bytes(names_bytes as uint - 1)); + let bytes = try!(file.read_exact(names_bytes as uint - 1)); let names_str = match str::from_utf8_owned(bytes) { Some(s) => s, None => return Err(~"input not utf-8"), }; @@ -250,7 +250,7 @@ pub fn parse(file: &mut io::Reader, string_offsets.push(try!(file.read_le_u16())); } - let string_table = try!(file.read_bytes(string_table_bytes as uint)); + let string_table = try!(file.read_exact(string_table_bytes as uint)); if string_table.len() != string_table_bytes as uint { return Err(~"error: hit EOF before end of string table"); |
