about summary refs log tree commit diff
path: root/src/librustpkg/package_source.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustpkg/package_source.rs')
-rw-r--r--src/librustpkg/package_source.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/librustpkg/package_source.rs b/src/librustpkg/package_source.rs
index ae2083f1b22..27a22a852a9 100644
--- a/src/librustpkg/package_source.rs
+++ b/src/librustpkg/package_source.rs
@@ -118,7 +118,7 @@ impl PkgSrc {
             return Some(local);
         }
 
-        if (self.id.path.clone()).components().len() < 2 {
+        if self.id.path.components().len() < 2 {
             // If a non-URL, don't bother trying to fetch
             return None;
         }
@@ -156,7 +156,7 @@ impl PkgSrc {
 
     /// True if the given path's stem is self's pkg ID's stem
     fn stem_matches(&self, p: &Path) -> bool {
-        p.filestem().map_default(false, |p| { p == &self.id.short_name })
+        p.filestem().map_default(false, |p| { p == &self.id.short_name.as_slice() })
     }
 
     fn push_crate(cs: &mut ~[Crate], prefix: uint, p: &Path) {
@@ -181,10 +181,10 @@ impl PkgSrc {
         do os::walk_dir(&dir) |pth| {
             let maybe_known_crate_set = match pth.filename() {
                 Some(filename) => match filename {
-                    ~"lib.rs" => Some(&mut self.libs),
-                    ~"main.rs" => Some(&mut self.mains),
-                    ~"test.rs" => Some(&mut self.tests),
-                    ~"bench.rs" => Some(&mut self.benchs),
+                    "lib.rs" => Some(&mut self.libs),
+                    "main.rs" => Some(&mut self.mains),
+                    "test.rs" => Some(&mut self.tests),
+                    "bench.rs" => Some(&mut self.benchs),
                     _ => None
                 },
                 _ => None