Up to date with master

This commit is contained in:
Yehuda Katz 2014-05-29 13:57:31 -07:00
parent a06fd2e7fa
commit edbe491003
11 changed files with 16 additions and 18 deletions

@ -1 +1 @@
Subproject commit e68c3610068f446304f88e08a57a9e7e3693fa59
Subproject commit 16b761d4372b4e91af06848781c8e998c3f25116

@ -1 +1 @@
Subproject commit 5fbc58a5f2251c427f405234a52a4bb54241b19a
Subproject commit b0b1d965e658ccdf751e57c4d9db8b9b86ceee4e

@ -1 +1 @@
Subproject commit ca130156b599a8f48e0edee3e782e8de93e00c34
Subproject commit 5508e9b6f1d389f88e8fb0144879926b961376dd

View File

@ -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;

View File

@ -59,7 +59,7 @@ fn execute() {
fn process(args: Vec<String>) -> CLIResult<(String, Vec<String>)> {
let args: Vec<String> = 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))

View File

@ -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"]);
}

View File

@ -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;

View File

@ -1,4 +1,3 @@
use std::os;
use std::os::args;
use std::io;
use std::path::Path;

View File

@ -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());
}
}

View File

@ -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<Execs> {
self.expect_stdout = Some(expected.to_owned());
self.expect_stdout = Some(expected.to_str());
self
}
pub fn with_stderr(mut ~self, expected: &str) -> Box<Execs> {
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()
}
}

View File

@ -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() {}