diff options
| author | bors <bors@rust-lang.org> | 2015-03-24 17:38:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-03-24 17:38:09 +0000 |
| commit | ed810385045ab0db90303574ba3ea47dfa2a36d5 (patch) | |
| tree | 161242c800aca625a26c56551fa5adb446c0089f /src/libterm | |
| parent | 28a0b25f424090255966273994748a9f9901059f (diff) | |
| parent | d252d0ad5434bcf77076729ab766eeff98f20ead (diff) | |
Auto merge of #23654 - alexcrichton:rollup, r=alexcrichton
Diffstat (limited to 'src/libterm')
| -rw-r--r-- | src/libterm/lib.rs | 2 | ||||
| -rw-r--r-- | src/libterm/terminfo/searcher.rs | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs index f517dca53cd..c907b87bc3c 100644 --- a/src/libterm/lib.rs +++ b/src/libterm/lib.rs @@ -19,6 +19,7 @@ //! # Examples //! //! ```no_run +//! # #![feature(rustc_private)] //! extern crate term; //! //! use std::io::prelude::*; @@ -62,6 +63,7 @@ #![feature(std_misc)] #![feature(str_char)] #![feature(path_ext)] +#![feature(convert)] #![cfg_attr(windows, feature(libc))] #[macro_use] extern crate log; diff --git a/src/libterm/terminfo/searcher.rs b/src/libterm/terminfo/searcher.rs index f47921cbf5e..66ee2b1ba87 100644 --- a/src/libterm/terminfo/searcher.rs +++ b/src/libterm/terminfo/searcher.rs @@ -31,7 +31,7 @@ pub fn get_dbpath_for_term(term: &str) -> Option<Box<PathBuf>> { // Find search directory match env::var_os("TERMINFO") { - Some(dir) => dirs_to_search.push(PathBuf::new(&dir)), + Some(dir) => dirs_to_search.push(PathBuf::from(dir)), None => { if homedir.is_some() { // ncurses compatibility; @@ -40,9 +40,9 @@ pub fn get_dbpath_for_term(term: &str) -> Option<Box<PathBuf>> { match env::var("TERMINFO_DIRS") { Ok(dirs) => for i in dirs.split(':') { if i == "" { - dirs_to_search.push(PathBuf::new("/usr/share/terminfo")); + dirs_to_search.push(PathBuf::from("/usr/share/terminfo")); } else { - dirs_to_search.push(PathBuf::new(i)); + dirs_to_search.push(PathBuf::from(i)); } }, // Found nothing in TERMINFO_DIRS, use the default paths: @@ -50,9 +50,9 @@ pub fn get_dbpath_for_term(term: &str) -> Option<Box<PathBuf>> { // ~/.terminfo, ncurses will search /etc/terminfo, then // /lib/terminfo, and eventually /usr/share/terminfo. Err(..) => { - dirs_to_search.push(PathBuf::new("/etc/terminfo")); - dirs_to_search.push(PathBuf::new("/lib/terminfo")); - dirs_to_search.push(PathBuf::new("/usr/share/terminfo")); + dirs_to_search.push(PathBuf::from("/etc/terminfo")); + dirs_to_search.push(PathBuf::from("/lib/terminfo")); + dirs_to_search.push(PathBuf::from("/usr/share/terminfo")); } } } |
