Update to master and fix warnings
authorYehuda Katz + Carl Lerche <engineering@tilde.io>
Thu, 12 Jun 2014 20:45:10 +0000 (13:45 -0700)
committerTim Carey-Smith <tim@spork.in>
Thu, 12 Jun 2014 20:45:10 +0000 (13:45 -0700)
libs/hammer.rs
src/bin/cargo-git-checkout.rs
src/cargo/core/manifest.rs
src/cargo/core/source.rs
src/cargo/ops/cargo_compile.rs
src/cargo/sources/git/source.rs
src/cargo/util/graph.rs
src/cargo/util/process_builder.rs
src/cargo/util/result.rs
src/cargo/util/toml.rs

index ae740b4ba884050eeae5b39048de0c31c6bdef30..aeaa9b7a216b42c42988521e79981f523e7a63fe 160000 (submodule)
@@ -1 +1 @@
-Subproject commit ae740b4ba884050eeae5b39048de0c31c6bdef30
+Subproject commit aeaa9b7a216b42c42988521e79981f523e7a63fe
index 801160f88e1718ff1de4e3e78ceaf1a95f9f3555..3b0bc57551f6dc22b960fbe5e42af2f971fbabd3 100644 (file)
@@ -33,7 +33,7 @@ fn execute(options: Options) -> CLIResult<Option<()>> {
         CLIError::new(format!("The URL `{}` you passed was not a valid URL", url), None::<&str>, 1)));
 
     let remote = GitRemote::new(url, verbose);
-    let source = GitSource::new(remote, reference, Path::new(database_path), Path::new(checkout_path), verbose);
+    let source = GitSource::new(remote, reference, Path::new(database_path), Path::new(checkout_path));
     try!(source.update().map_err(|e| {
         CLIError::new(format!("Couldn't update {}: {}", source, e), None::<&str>, 1)
     }));
index ae8000d664af5d2386b8f956fba7d529bb17a25e..d5d459c6b43edafb5e08507f435a11c11b4340de 100644 (file)
@@ -6,7 +6,6 @@ use core::source::SourceId;
 use core::{
     Dependency,
     PackageId,
-    Source,
     Summary
 };
 use core::dependency::SerializedDependency;
index 936bb23e0391b288f9fa1b7384557dddd3623a2f..132f764e67ba47975a535896fa72fef0d3decaec 100644 (file)
@@ -1,7 +1,6 @@
 use url::Url;
 use core::{Summary,Package,PackageId};
 use util::CargoResult;
-use sources::GitSource;
 
 /**
  * A Source finds and downloads remote packages based on names and
index f82040d3953899d56a0d36bbdf2160291fec9b28..072b2bc95fceba822c3c8fc9dd569f8b7a572d62 100644 (file)
@@ -64,7 +64,7 @@ fn sources_for(package: &Package) -> CargoResult<SourceSet> {
                 // .cargo/git/checkouts
                 let db_path = git.join("db").join(source_id.url.to_str());
                 let checkout_path = git.join("checkouts").join(source_id.url.to_str()).join(reference.as_slice());
-                Ok(box GitSource::new(remote, reference.clone(), db_path, checkout_path, false) as Box<Source>)
+                Ok(box GitSource::new(remote, reference.clone(), db_path, checkout_path) as Box<Source>)
             }
         }
     })));
index ec33b9b0208d72e16f4362acc816154444614af1..2e2de1b58d45f350a3f10e04cf01c317bb3eae7d 100644 (file)
@@ -11,13 +11,12 @@ pub struct GitSource {
     remote: GitRemote,
     reference: GitReference,
     db_path: Path,
-    checkout_path: Path,
-    verbose: bool
+    checkout_path: Path
 }
 
 impl GitSource {
-    pub fn new(remote: GitRemote, reference: String, db: Path, checkout: Path, verbose: bool) -> GitSource {
-        GitSource { remote: remote, reference: GitReference::for_str(reference), db_path: db, checkout_path: checkout, verbose: verbose }
+    pub fn new(remote: GitRemote, reference: String, db: Path, checkout: Path) -> GitSource {
+        GitSource { remote: remote, reference: GitReference::for_str(reference), db_path: db, checkout_path: checkout }
     }
 
     pub fn get_namespace<'a>(&'a self) -> &'a url::Url {
index 8a9c18e0f8b5a59244ee6ea0a48694790914b593..7fc62aa3c12f1a92ad191ac26d0fc25eb200ef90 100644 (file)
@@ -2,7 +2,7 @@ use std::hash::Hash;
 use std::collections::HashMap;
 
 pub struct Graph<N> {
-    nodes: HashMap<N, ~[N]>
+    nodes: HashMap<N, Vec<N>>
 }
 
 enum Mark {
index 416c023acb74d5563e58700b011da82275860eeb..6d26eea2647c3d74b2b3e53afcbe916d731f2755 100644 (file)
@@ -68,7 +68,7 @@ impl ProcessBuilder {
     pub fn exec(&self) -> CargoResult<()> {
         let mut command = self.build_command();
         command
-            .env(self.build_env())
+            .env(self.build_env().as_slice())
             .stdout(InheritFd(1))
             .stderr(InheritFd(2));
 
@@ -84,7 +84,7 @@ impl ProcessBuilder {
 
     pub fn exec_with_output(&self) -> CargoResult<ProcessOutput> {
         let mut command = self.build_command();
-        command.env(self.build_env());
+        command.env(self.build_env().as_slice());
 
         let output = try!(command.output().map_err(io_error));
 
@@ -106,7 +106,7 @@ impl ProcessBuilder {
         format!("{} {}", self.program, self.args.connect(" "))
     }
 
-    fn build_env(&self) -> ~[(String, String)] {
+    fn build_env(&self) -> Vec<(String, String)> {
         let mut ret = Vec::new();
 
         for (key, val) in self.env.iter() {
index 3f943d1eb66b87b9ab3fb7930101649af4a3140a..e0419e1626b9c2e00b563bdacb8f5796ec1a17cf 100644 (file)
@@ -80,8 +80,8 @@ pub struct CargoError {
 impl Show for CargoError {
     fn fmt(&self, f: &mut Formatter) -> fmt::Result {
         match self.desc {
-            StaticDescription(string) => write!(f, "{}", string),
-            BoxedDescription(ref string) => write!(f, "{}", string)
+            StaticDescription(string) => try!(write!(f, "{}", string)),
+            BoxedDescription(ref string) => try!(write!(f, "{}", string))
         };
 
         write!(f, "; kind={}", self.kind)
index 1a1b273a9a7e842a4507dc2720d6698bb029c964..bb05837cfac52261aa1a2e5dd57f1ddd03fb6393 100644 (file)
@@ -5,7 +5,7 @@ use std::collections::HashMap;
 use serialize::Decodable;
 
 use core::source::{SourceId,GitKind};
-use core::{Summary,Manifest,Target,Dependency,PackageId,Source};
+use core::{Summary,Manifest,Target,Dependency,PackageId};
 use util::{CargoResult,Require,simple_human,toml_error};
 
 pub fn to_manifest(contents: &[u8], namespace: &Url) -> CargoResult<Manifest> {