diff options
Diffstat (limited to 'src/libterm')
| -rw-r--r-- | src/libterm/terminfo/mod.rs | 6 | ||||
| -rw-r--r-- | src/libterm/terminfo/parser/compiled.rs | 3 | ||||
| -rw-r--r-- | src/libterm/terminfo/searcher.rs | 4 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/libterm/terminfo/mod.rs b/src/libterm/terminfo/mod.rs index 36e5c1cf763..7562bf2d163 100644 --- a/src/libterm/terminfo/mod.rs +++ b/src/libterm/terminfo/mod.rs @@ -81,9 +81,11 @@ impl<T: Writer> Terminal<T> for TerminfoTerminal<T> { } }; - let entry = open(term); + let entry = open(term.as_slice()); if entry.is_err() { - if os::getenv("MSYSCON").map_or(false, |s| "mintty.exe" == s) { + if os::getenv("MSYSCON").map_or(false, |s| { + "mintty.exe" == s.as_slice() + }) { // msys terminal return Some(TerminfoTerminal {out: out, ti: msys_terminfo(), num_colors: 8}); } diff --git a/src/libterm/terminfo/parser/compiled.rs b/src/libterm/terminfo/parser/compiled.rs index 5a1c8ea02e2..687e27f4282 100644 --- a/src/libterm/terminfo/parser/compiled.rs +++ b/src/libterm/terminfo/parser/compiled.rs @@ -221,7 +221,8 @@ pub fn parse(file: &mut io::Reader, longnames: bool) None => return Err("input not utf-8".to_strbuf()), }; - let term_names: Vec<StrBuf> = names_str.split('|') + let term_names: Vec<StrBuf> = names_str.as_slice() + .split('|') .map(|s| s.to_strbuf()) .collect(); diff --git a/src/libterm/terminfo/searcher.rs b/src/libterm/terminfo/searcher.rs index a7365102f96..ac5737c46ed 100644 --- a/src/libterm/terminfo/searcher.rs +++ b/src/libterm/terminfo/searcher.rs @@ -36,11 +36,11 @@ pub fn get_dbpath_for_term(term: &str) -> Option<Box<Path>> { dirs_to_search.push(homedir.unwrap().join(".terminfo")) } match getenv("TERMINFO_DIRS") { - Some(dirs) => for i in dirs.split(':') { + Some(dirs) => for i in dirs.as_slice().split(':') { if i == "" { dirs_to_search.push(Path::new("/usr/share/terminfo")); } else { - dirs_to_search.push(Path::new(i.to_owned())); + dirs_to_search.push(Path::new(i.to_strbuf())); } }, // Found nothing in TERMINFO_DIRS, use the default paths: |
