diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2015-01-02 13:56:28 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2015-01-07 10:46:33 +1300 |
| commit | f7ff37e4c52a1d6562635fcd5bab6309cf75ea08 (patch) | |
| tree | 9c69736bf3830f9048f61d45943bf0fa6326782d /src/libterm/terminfo/parser | |
| parent | 918255ef8c3c21b2009204c3019239f8dc9f46bf (diff) | |
| download | rust-f7ff37e4c52a1d6562635fcd5bab6309cf75ea08.tar.gz rust-f7ff37e4c52a1d6562635fcd5bab6309cf75ea08.zip | |
Replace full slice notation with index calls
Diffstat (limited to 'src/libterm/terminfo/parser')
| -rw-r--r-- | src/libterm/terminfo/parser/compiled.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libterm/terminfo/parser/compiled.rs b/src/libterm/terminfo/parser/compiled.rs index 5f0111c7d7a..4617be4f3f6 100644 --- a/src/libterm/terminfo/parser/compiled.rs +++ b/src/libterm/terminfo/parser/compiled.rs @@ -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 \ |
