about summary refs log tree commit diff
path: root/src/libextra
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-11-22 15:45:12 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-11-29 10:55:13 -0800
commitc54427ddfbbab41a39d14f2b1dc4f080cbc2d41b (patch)
tree7b4e7af9dfe4342f3fd474f1010d4839281edd87 /src/libextra
parent6c672ee094a1a8e72c100100f43c73a9741f08a7 (diff)
downloadrust-c54427ddfbbab41a39d14f2b1dc4f080cbc2d41b.tar.gz
rust-c54427ddfbbab41a39d14f2b1dc4f080cbc2d41b.zip
libstd: Change `Path::new` to `Path::init`.
Diffstat (limited to 'src/libextra')
-rw-r--r--src/libextra/glob.rs6
-rw-r--r--src/libextra/terminfo/searcher.rs10
-rw-r--r--src/libextra/test.rs6
3 files changed, 11 insertions, 11 deletions
diff --git a/src/libextra/glob.rs b/src/libextra/glob.rs
index e398a10ecf1..6ef3801a086 100644
--- a/src/libextra/glob.rs
+++ b/src/libextra/glob.rs
@@ -90,7 +90,7 @@ pub fn glob_with(pattern: &str, options: MatchOptions) -> GlobIterator {
 
     // calculate root this way to handle volume-relative Windows paths correctly
     let mut root = os::getcwd();
-    let pat_root = Path::new(pattern).root_path();
+    let pat_root = Path::init(pattern).root_path();
     if pat_root.is_some() {
         if check_windows_verbatim(pat_root.get_ref()) {
             // XXX: How do we want to handle verbatim paths? I'm inclined to return nothing,
@@ -766,9 +766,9 @@ mod test {
 
     #[test]
     fn test_matches_path() {
-        // on windows, (Path::new("a/b").as_str().unwrap() == "a\\b"), so this
+        // on windows, (Path::init("a/b").as_str().unwrap() == "a\\b"), so this
         // tests that / and \ are considered equivalent on windows
-        assert!(Pattern::new("a/b").matches_path(&Path::new("a/b")));
+        assert!(Pattern::new("a/b").matches_path(&Path::init("a/b")));
     }
 }
 
diff --git a/src/libextra/terminfo/searcher.rs b/src/libextra/terminfo/searcher.rs
index 09f8cc0efef..c83414b44c6 100644
--- a/src/libextra/terminfo/searcher.rs
+++ b/src/libextra/terminfo/searcher.rs
@@ -29,7 +29,7 @@ pub fn get_dbpath_for_term(term: &str) -> Option<~Path> {
 
     // Find search directory
     match getenv("TERMINFO") {
-        Some(dir) => dirs_to_search.push(Path::new(dir)),
+        Some(dir) => dirs_to_search.push(Path::init(dir)),
         None => {
             if homedir.is_some() {
                 // ncurses compatability;
@@ -38,17 +38,17 @@ pub fn get_dbpath_for_term(term: &str) -> Option<~Path> {
             match getenv("TERMINFO_DIRS") {
                 Some(dirs) => for i in dirs.split(':') {
                     if i == "" {
-                        dirs_to_search.push(Path::new("/usr/share/terminfo"));
+                        dirs_to_search.push(Path::init("/usr/share/terminfo"));
                     } else {
-                        dirs_to_search.push(Path::new(i.to_owned()));
+                        dirs_to_search.push(Path::init(i.to_owned()));
                     }
                 },
                 // Found nothing, use the default paths
                 // /usr/share/terminfo is the de facto location, but it seems
                 // Ubuntu puts it in /lib/terminfo
                 None => {
-                    dirs_to_search.push(Path::new("/usr/share/terminfo"));
-                    dirs_to_search.push(Path::new("/lib/terminfo"));
+                    dirs_to_search.push(Path::init("/usr/share/terminfo"));
+                    dirs_to_search.push(Path::init("/lib/terminfo"));
                 }
             }
         }
diff --git a/src/libextra/test.rs b/src/libextra/test.rs
index c16d4aa3e16..2fd38825ae2 100644
--- a/src/libextra/test.rs
+++ b/src/libextra/test.rs
@@ -276,20 +276,20 @@ pub fn parse_opts(args: &[~str]) -> Option<OptRes> {
     let run_ignored = matches.opt_present("ignored");
 
     let logfile = matches.opt_str("logfile");
-    let logfile = logfile.map(|s| Path::new(s));
+    let logfile = logfile.map(|s| Path::init(s));
 
     let run_benchmarks = matches.opt_present("bench");
     let run_tests = ! run_benchmarks ||
         matches.opt_present("test");
 
     let ratchet_metrics = matches.opt_str("ratchet-metrics");
-    let ratchet_metrics = ratchet_metrics.map(|s| Path::new(s));
+    let ratchet_metrics = ratchet_metrics.map(|s| Path::init(s));
 
     let ratchet_noise_percent = matches.opt_str("ratchet-noise-percent");
     let ratchet_noise_percent = ratchet_noise_percent.map(|s| from_str::<f64>(s).unwrap());
 
     let save_metrics = matches.opt_str("save-metrics");
-    let save_metrics = save_metrics.map(|s| Path::new(s));
+    let save_metrics = save_metrics.map(|s| Path::init(s));
 
     let test_shard = matches.opt_str("test-shard");
     let test_shard = opt_shard(test_shard);