diff options
| author | bors <bors@rust-lang.org> | 2015-01-07 05:31:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-07 05:31:23 +0000 |
| commit | 9e4e524e0eb17c8f463e731f23b544003e8709c6 (patch) | |
| tree | 916024d35e08f0826c20654f629ec596b5cb1f14 /src/libterm/terminfo/parser/compiled.rs | |
| parent | ea6f65c5f1a3f84e010d2cef02a0160804e9567a (diff) | |
| parent | a64000820f0fc32be4d7535a9a92418a434fa4ba (diff) | |
auto merge of #20677 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libterm/terminfo/parser/compiled.rs')
| -rw-r--r-- | src/libterm/terminfo/parser/compiled.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libterm/terminfo/parser/compiled.rs b/src/libterm/terminfo/parser/compiled.rs index 5f0111c7d7a..7a06849abd1 100644 --- a/src/libterm/terminfo/parser/compiled.rs +++ b/src/libterm/terminfo/parser/compiled.rs @@ -163,7 +163,7 @@ pub fn parse(file: &mut io::Reader, longnames: bool) macro_rules! try { ($e:expr) => ( match $e { Ok(e) => e, - Err(e) => return Err(format!("{}", e)) + Err(e) => return Err(format!("{:?}", e)) } ) } @@ -284,13 +284,13 @@ pub fn parse(file: &mut io::Reader, longnames: bool) // Find the offset of the NUL we want to go to - let nulpos = string_table[offset as uint .. string_table_bytes as uint] + let nulpos = string_table.index(&((offset as uint) .. (string_table_bytes as uint))) .iter().position(|&b| b == 0); match nulpos { Some(len) => { string_map.insert(name.to_string(), - string_table[offset as uint .. - offset as uint + len].to_vec()) + string_table.index(&((offset as uint) .. + (offset as uint + len))).to_vec()) }, None => { return Err("invalid file: missing NUL in \ |
