about summary refs log tree commit diff
path: root/src/librustpkg/source_control.rs
diff options
context:
space:
mode:
authorKevin Ballard <kevin@sb.org>2013-10-05 19:49:32 -0700
committerKevin Ballard <kevin@sb.org>2013-10-15 22:18:30 -0700
commitd6d9b926836b1f1c2b8b3fe4ab35dc63bec7ffcd (patch)
treee197783b86700e71d94c9bc6d0254eb25b16cc0c /src/librustpkg/source_control.rs
parented539e14712539473c3e89604cb69e2307110772 (diff)
downloadrust-d6d9b926836b1f1c2b8b3fe4ab35dc63bec7ffcd.tar.gz
rust-d6d9b926836b1f1c2b8b3fe4ab35dc63bec7ffcd.zip
path2: Adjust the API to remove all the _str mutation methods
Add a new trait BytesContainer that is implemented for both byte vectors
and strings.

Convert Path::from_vec and ::from_str to one function, Path::new().

Remove all the _str-suffixed mutation methods (push, join, with_*,
set_*) and modify the non-suffixed versions to use BytesContainer.
Diffstat (limited to 'src/librustpkg/source_control.rs')
-rw-r--r--src/librustpkg/source_control.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustpkg/source_control.rs b/src/librustpkg/source_control.rs
index b910c079205..2fc925a8a6a 100644
--- a/src/librustpkg/source_control.rs
+++ b/src/librustpkg/source_control.rs
@@ -43,7 +43,7 @@ pub fn safe_git_clone(source: &Path, v: &Version, target: &Path) -> CloneResult
                 else {
                 match v {
                     &ExactRevision(ref s) => {
-                        let git_dir = target.join_str(".git");
+                        let git_dir = target.join(".git");
                         debug2!("`Running: git --work-tree={} --git-dir={} checkout {}",
                                 *s, target.display(), git_dir.display());
                         // FIXME (#9639: This needs to handle non-utf8 paths
@@ -64,7 +64,7 @@ pub fn safe_git_clone(source: &Path, v: &Version, target: &Path) -> CloneResult
             // Check that no version was specified. There's no reason to not handle the
             // case where a version was requested, but I haven't implemented it.
             assert!(*v == NoVersion);
-            let git_dir = target.join_str(".git");
+            let git_dir = target.join(".git");
             debug2!("Running: git --work-tree={} --git-dir={} pull --no-edit {}",
                     target.display(), git_dir.display(), source.display());
             // FIXME (#9639: This needs to handle non-utf8 paths
@@ -80,7 +80,7 @@ pub fn safe_git_clone(source: &Path, v: &Version, target: &Path) -> CloneResult
 
         let scratch_dir = TempDir::new("rustpkg");
         let clone_target = match scratch_dir {
-            Some(d) => d.unwrap().join_str("rustpkg_temp"),
+            Some(d) => d.unwrap().join("rustpkg_temp"),
             None    => cond.raise(~"Failed to create temporary directory for fetching git sources")
         };
 
@@ -136,5 +136,5 @@ fn process_output_in_cwd(prog: &str, args: &[~str], cwd: &Path) -> ProcessOutput
 }
 
 pub fn is_git_dir(p: &Path) -> bool {
-    os::path_is_dir(&p.join_str(".git"))
+    os::path_is_dir(&p.join(".git"))
 }