-Subproject commit e68c3610068f446304f88e08a57a9e7e3693fa59
+Subproject commit 16b761d4372b4e91af06848781c8e998c3f25116
-Subproject commit 5fbc58a5f2251c427f405234a52a4bb54241b19a
+Subproject commit b0b1d965e658ccdf751e57c4d9db8b9b86ceee4e
-Subproject commit ca130156b599a8f48e0edee3e782e8de93e00c34
+Subproject commit 5508e9b6f1d389f88e8fb0144879926b961376dd
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;
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))
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"]);
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"]);
}
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;
-use std::os;
use std::os::args;
use std::io;
use std::path::Path;
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());
}
}
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> {
impl ProjectBuilder {
pub fn new(name: &str, root: Path) -> ProjectBuilder {
ProjectBuilder {
- name: name.to_owned(),
+ name: name.to_str(),
root: root,
files: vec!()
}
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
}
impl ham::SelfDescribing for Execs {
fn describe(&self) -> String {
- "execs".to_owned()
+ "execs".to_str()
}
}
"#)
.file("bar/src/bar.rs", r#"
pub fn gimme() -> String {
- "test passed".to_owned()
+ "test passed".to_str()
}
fn dead() {}