Fix tests. Add Vec<u8> conversion to StrBuf.

This commit is contained in:
Huon Wilson 2014-04-10 20:55:34 +10:00
parent d8e45ea7c0
commit def90f43e2
8 changed files with 88 additions and 60 deletions

View file

@ -402,7 +402,7 @@ fn make_command_line(prog: &str, args: &[~str]) -> ~str {
cmd.push_char(' ');
append_arg(&mut cmd, *arg);
}
return cmd.to_owned_str();
return cmd.into_owned();
fn append_arg(cmd: &mut StrBuf, arg: &str) {
let quote = arg.chars().any(|c| c == ' ' || c == '\t');