diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-05-16 10:45:16 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-05-22 14:42:01 -0700 |
| commit | 36195eb91f15975fed7555a3aa52807ecd5698a1 (patch) | |
| tree | d0e99310be4a24e76b8d6b13f05ec79c1f89b6ba /src/libterm | |
| parent | e402e75f4eb79af09b9451f0f232f994b3e2c998 (diff) | |
| download | rust-36195eb91f15975fed7555a3aa52807ecd5698a1.tar.gz rust-36195eb91f15975fed7555a3aa52807ecd5698a1.zip | |
libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.
Diffstat (limited to 'src/libterm')
| -rw-r--r-- | src/libterm/terminfo/mod.rs | 6 | ||||
| -rw-r--r-- | src/libterm/terminfo/searcher.rs | 4 |
2 files changed, 6 insertions, 4 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/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: |
