From: Yehuda Katz + Carl Lerche Date: Thu, 12 Jun 2014 20:45:10 +0000 (-0700) Subject: Update to master and fix warnings X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~1016 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9c101e39a47a404c49b2d12064f9f213253a8360;p=cargo.git Update to master and fix warnings --- diff --git a/libs/hammer.rs b/libs/hammer.rs index ae740b4ba..aeaa9b7a2 160000 --- a/libs/hammer.rs +++ b/libs/hammer.rs @@ -1 +1 @@ -Subproject commit ae740b4ba884050eeae5b39048de0c31c6bdef30 +Subproject commit aeaa9b7a216b42c42988521e79981f523e7a63fe diff --git a/src/bin/cargo-git-checkout.rs b/src/bin/cargo-git-checkout.rs index 801160f88..3b0bc5755 100644 --- a/src/bin/cargo-git-checkout.rs +++ b/src/bin/cargo-git-checkout.rs @@ -33,7 +33,7 @@ fn execute(options: Options) -> CLIResult> { 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) })); diff --git a/src/cargo/core/manifest.rs b/src/cargo/core/manifest.rs index ae8000d66..d5d459c6b 100644 --- a/src/cargo/core/manifest.rs +++ b/src/cargo/core/manifest.rs @@ -6,7 +6,6 @@ use core::source::SourceId; use core::{ Dependency, PackageId, - Source, Summary }; use core::dependency::SerializedDependency; diff --git a/src/cargo/core/source.rs b/src/cargo/core/source.rs index 936bb23e0..132f764e6 100644 --- a/src/cargo/core/source.rs +++ b/src/cargo/core/source.rs @@ -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 diff --git a/src/cargo/ops/cargo_compile.rs b/src/cargo/ops/cargo_compile.rs index f82040d39..072b2bc95 100644 --- a/src/cargo/ops/cargo_compile.rs +++ b/src/cargo/ops/cargo_compile.rs @@ -64,7 +64,7 @@ fn sources_for(package: &Package) -> CargoResult { // .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) + Ok(box GitSource::new(remote, reference.clone(), db_path, checkout_path) as Box) } } }))); diff --git a/src/cargo/sources/git/source.rs b/src/cargo/sources/git/source.rs index ec33b9b02..2e2de1b58 100644 --- a/src/cargo/sources/git/source.rs +++ b/src/cargo/sources/git/source.rs @@ -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 { diff --git a/src/cargo/util/graph.rs b/src/cargo/util/graph.rs index 8a9c18e0f..7fc62aa3c 100644 --- a/src/cargo/util/graph.rs +++ b/src/cargo/util/graph.rs @@ -2,7 +2,7 @@ use std::hash::Hash; use std::collections::HashMap; pub struct Graph { - nodes: HashMap + nodes: HashMap> } enum Mark { diff --git a/src/cargo/util/process_builder.rs b/src/cargo/util/process_builder.rs index 416c023ac..6d26eea26 100644 --- a/src/cargo/util/process_builder.rs +++ b/src/cargo/util/process_builder.rs @@ -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 { 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() { diff --git a/src/cargo/util/result.rs b/src/cargo/util/result.rs index 3f943d1eb..e0419e162 100644 --- a/src/cargo/util/result.rs +++ b/src/cargo/util/result.rs @@ -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) diff --git a/src/cargo/util/toml.rs b/src/cargo/util/toml.rs index 1a1b273a9..bb05837cf 100644 --- a/src/cargo/util/toml.rs +++ b/src/cargo/util/toml.rs @@ -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 {