From f7ff37e4c52a1d6562635fcd5bab6309cf75ea08 Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Fri, 2 Jan 2015 13:56:28 +1300 Subject: Replace full slice notation with index calls --- src/libterm/terminfo/mod.rs | 2 +- src/libterm/terminfo/parser/compiled.rs | 6 +++--- src/libterm/terminfo/searcher.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libterm') diff --git a/src/libterm/terminfo/mod.rs b/src/libterm/terminfo/mod.rs index 80d195d9218..71c71017850 100644 --- a/src/libterm/terminfo/mod.rs +++ b/src/libterm/terminfo/mod.rs @@ -180,7 +180,7 @@ impl TerminfoTerminal { } }; - let entry = open(term[]); + let entry = open(term.index(&FullRange)); if entry.is_err() { if os::getenv("MSYSCON").map_or(false, |s| { "mintty.exe" == s 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 \ diff --git a/src/libterm/terminfo/searcher.rs b/src/libterm/terminfo/searcher.rs index 395fac52d8d..38be6860079 100644 --- a/src/libterm/terminfo/searcher.rs +++ b/src/libterm/terminfo/searcher.rs @@ -61,13 +61,13 @@ pub fn get_dbpath_for_term(term: &str) -> Option> { for p in dirs_to_search.iter() { if p.exists() { let f = first_char.to_string(); - let newp = p.join_many(&[f[], term]); + let newp = p.join_many(&[f.index(&FullRange), term]); if newp.exists() { return Some(box newp); } // on some installations the dir is named after the hex of the char (e.g. OS X) let f = format!("{:x}", first_char as uint); - let newp = p.join_many(&[f[], term]); + let newp = p.join_many(&[f.index(&FullRange), term]); if newp.exists() { return Some(box newp); } -- cgit 1.4.1-3-g733a5