From edbe491003ebb308e9ea038901639576dda26f0c Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Thu, 29 May 2014 13:57:31 -0700 Subject: [PATCH] Up to date with master --- libs/hamcrest-rust | 2 +- libs/hammer.rs | 2 +- libs/rust-toml | 2 +- src/bin/cargo-git-checkout.rs | 1 - src/bin/cargo.rs | 2 +- src/cargo/core/version_req.rs | 6 +++--- src/cargo/ops/cargo_compile.rs | 2 +- src/cargo/ops/cargo_rustc.rs | 1 - src/cargo/util/process_builder.rs | 4 ++-- tests/support.rs | 10 +++++----- tests/test_cargo_compile.rs | 2 +- 11 files changed, 16 insertions(+), 18 deletions(-) diff --git a/libs/hamcrest-rust b/libs/hamcrest-rust index e68c36100..16b761d43 160000 --- a/libs/hamcrest-rust +++ b/libs/hamcrest-rust @@ -1 +1 @@ -Subproject commit e68c3610068f446304f88e08a57a9e7e3693fa59 +Subproject commit 16b761d4372b4e91af06848781c8e998c3f25116 diff --git a/libs/hammer.rs b/libs/hammer.rs index 5fbc58a5f..b0b1d965e 160000 --- a/libs/hammer.rs +++ b/libs/hammer.rs @@ -1 +1 @@ -Subproject commit 5fbc58a5f2251c427f405234a52a4bb54241b19a +Subproject commit b0b1d965e658ccdf751e57c4d9db8b9b86ceee4e diff --git a/libs/rust-toml b/libs/rust-toml index ca130156b..5508e9b6f 160000 --- a/libs/rust-toml +++ b/libs/rust-toml @@ -1 +1 @@ -Subproject commit ca130156b599a8f48e0edee3e782e8de93e00c34 +Subproject commit 5508e9b6f1d389f88e8fb0144879926b961376dd diff --git a/src/bin/cargo-git-checkout.rs b/src/bin/cargo-git-checkout.rs index a35df0b32..7bbf7aabf 100644 --- a/src/bin/cargo-git-checkout.rs +++ b/src/bin/cargo-git-checkout.rs @@ -7,7 +7,6 @@ extern crate url; use hammer::FlagConfig; use cargo::{execute_main_without_stdin,CLIResult,CLIError,ToResult}; -use cargo::util::ToCLI; use cargo::sources::git::{GitRemoteRepo,GitRepo}; use url::Url; diff --git a/src/bin/cargo.rs b/src/bin/cargo.rs index 8b0c626ce..d803bbda9 100644 --- a/src/bin/cargo.rs +++ b/src/bin/cargo.rs @@ -59,7 +59,7 @@ fn execute() { fn process(args: Vec) -> CLIResult<(String, Vec)> { let args: Vec = Vec::from_slice(args.tail()); - let head = try!(args.iter().nth(0).to_result(|_| CLIError::new("No subcommand found", None::<&str>, 1))).to_owned(); + let head = try!(args.iter().nth(0).to_result(|_| CLIError::new("No subcommand found", None::<&str>, 1))).to_str(); let tail = Vec::from_slice(args.tail()); Ok((head, tail)) diff --git a/src/cargo/core/version_req.rs b/src/cargo/core/version_req.rs index 8dfb49ff2..b0642c064 100644 --- a/src/cargo/core/version_req.rs +++ b/src/cargo/core/version_req.rs @@ -500,14 +500,14 @@ mod test { pub fn test_parsing_exact() { let r = req("1.0.0"); - assert!(r.to_str() == "= 1.0.0".to_owned()); + assert!(r.to_str() == "= 1.0.0".to_str()); assert_match(&r, ["1.0.0"]); assert_not_match(&r, ["1.0.1", "0.9.9", "0.10.0", "0.1.0"]); let r = req("0.9.0"); - assert!(r.to_str() == "= 0.9.0".to_owned()); + assert!(r.to_str() == "= 0.9.0".to_str()); assert_match(&r, ["0.9.0"]); assert_not_match(&r, ["0.9.1", "1.9.0", "0.0.9"]); @@ -517,7 +517,7 @@ mod test { pub fn test_parsing_greater_than() { let r = req(">= 1.0.0"); - assert!(r.to_str() == ">= 1.0.0".to_owned()); + assert!(r.to_str() == ">= 1.0.0".to_str()); assert_match(&r, ["1.0.0"]); } diff --git a/src/cargo/ops/cargo_compile.rs b/src/cargo/ops/cargo_compile.rs index fe6c499fb..a0311c9ea 100644 --- a/src/cargo/ops/cargo_compile.rs +++ b/src/cargo/ops/cargo_compile.rs @@ -17,7 +17,7 @@ use std::os; use util::config; use util::config::{ConfigValue}; -use core::{Package,PackageSet,Source}; +use core::{PackageSet,Source}; use core::resolver::resolve; use sources::path::PathSource; use ops; diff --git a/src/cargo/ops/cargo_rustc.rs b/src/cargo/ops/cargo_rustc.rs index 907a6ca96..d04ecfd72 100644 --- a/src/cargo/ops/cargo_rustc.rs +++ b/src/cargo/ops/cargo_rustc.rs @@ -1,4 +1,3 @@ -use std::os; use std::os::args; use std::io; use std::path::Path; diff --git a/src/cargo/util/process_builder.rs b/src/cargo/util/process_builder.rs index 5ad4a5fd5..4d332fbdd 100644 --- a/src/cargo/util/process_builder.rs +++ b/src/cargo/util/process_builder.rs @@ -54,10 +54,10 @@ impl ProcessBuilder { pub fn env(mut self, key: &str, val: Option<&str>) -> ProcessBuilder { match val { Some(v) => { - self.env.insert(key.to_strbuf(), v.to_strbuf()); + self.env.insert(key.to_str(), v.to_str()); }, None => { - self.env.remove(&key.to_strbuf()); + self.env.remove(&key.to_str()); } } diff --git a/tests/support.rs b/tests/support.rs index 456a3a112..59595a281 100644 --- a/tests/support.rs +++ b/tests/support.rs @@ -29,7 +29,7 @@ struct FileBuilder { impl FileBuilder { pub fn new(path: Path, body: &str) -> FileBuilder { - FileBuilder { path: path, body: body.to_owned() } + FileBuilder { path: path, body: body.to_str() } } fn mk(&self) -> Result<(), String> { @@ -58,7 +58,7 @@ struct ProjectBuilder { impl ProjectBuilder { pub fn new(name: &str, root: Path) -> ProjectBuilder { ProjectBuilder { - name: name.to_owned(), + name: name.to_str(), root: root, files: vec!() } @@ -167,12 +167,12 @@ struct Execs { impl Execs { pub fn with_stdout(mut ~self, expected: &str) -> Box { - self.expect_stdout = Some(expected.to_owned()); + self.expect_stdout = Some(expected.to_str()); self } pub fn with_stderr(mut ~self, expected: &str) -> Box { - self.expect_stderr = Some(expected.to_owned()); + self.expect_stderr = Some(expected.to_str()); self } @@ -223,7 +223,7 @@ impl Execs { impl ham::SelfDescribing for Execs { fn describe(&self) -> String { - "execs".to_owned() + "execs".to_str() } } diff --git a/tests/test_cargo_compile.rs b/tests/test_cargo_compile.rs index 7b984425c..be1dc7e0b 100644 --- a/tests/test_cargo_compile.rs +++ b/tests/test_cargo_compile.rs @@ -114,7 +114,7 @@ test!(cargo_compile_with_warnings_in_a_dep_package { "#) .file("bar/src/bar.rs", r#" pub fn gimme() -> String { - "test passed".to_owned() + "test passed".to_str() } fn dead() {} -- 2.30.2