about summary refs log tree commit diff
path: root/src/libterm
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-05-22 15:16:31 -0700
committerbors <bors@rust-lang.org>2014-05-22 15:16:31 -0700
commit87ad19eb78239707f1ceed43e475c6aa052efdbc (patch)
tree35940d52f145bca81dcf73e5e7da7f3847ceb413 /src/libterm
parente402e75f4eb79af09b9451f0f232f994b3e2c998 (diff)
parente878721d70349e2055f0ef854085de92e9498fde (diff)
downloadrust-87ad19eb78239707f1ceed43e475c6aa052efdbc.tar.gz
rust-87ad19eb78239707f1ceed43e475c6aa052efdbc.zip
auto merge of #14310 : pcwalton/rust/detildestr-alllibs, r=brson
r? @brson
Diffstat (limited to 'src/libterm')
-rw-r--r--src/libterm/terminfo/mod.rs6
-rw-r--r--src/libterm/terminfo/parser/compiled.rs3
-rw-r--r--src/libterm/terminfo/searcher.rs4
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: