mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Move away from as_slice() in contenttest.
This commit is contained in:
parent
6b0bf4cf0a
commit
3cd9f4e428
1 changed files with 3 additions and 4 deletions
|
@ -8,7 +8,6 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(collections)]
|
#![feature(collections)]
|
||||||
#![feature(core)]
|
|
||||||
#![feature(exit_status)]
|
#![feature(exit_status)]
|
||||||
#![feature(path)]
|
#![feature(path)]
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
|
@ -48,7 +47,7 @@ fn main() {
|
||||||
fn parse_config(args: Vec<String>) -> Config {
|
fn parse_config(args: Vec<String>) -> Config {
|
||||||
let args = args.tail();
|
let args = args.tail();
|
||||||
let opts = vec!(reqopt("s", "source-dir", "source-dir", "source-dir"));
|
let opts = vec!(reqopt("s", "source-dir", "source-dir", "source-dir"));
|
||||||
let matches = match getopts(args, opts.as_slice()) {
|
let matches = match getopts(args, &opts) {
|
||||||
Ok(m) => m,
|
Ok(m) => m,
|
||||||
Err(f) => panic!(f.to_string())
|
Err(f) => panic!(f.to_string())
|
||||||
};
|
};
|
||||||
|
@ -97,7 +96,7 @@ fn run_test(file: String) {
|
||||||
let path = env::current_dir().unwrap().join(&file);
|
let path = env::current_dir().unwrap().join(&file);
|
||||||
// FIXME (#1094): not the right way to transform a path
|
// FIXME (#1094): not the right way to transform a path
|
||||||
let infile = format!("file://{}", path.display());
|
let infile = format!("file://{}", path.display());
|
||||||
let args = ["-z", "-f", infile.as_slice()];
|
let args = ["-z", "-f", &*infile];
|
||||||
|
|
||||||
let mut prc_arg = env::current_exe().unwrap();
|
let mut prc_arg = env::current_exe().unwrap();
|
||||||
let prc_arg = match prc_arg.pop() {
|
let prc_arg = match prc_arg.pop() {
|
||||||
|
@ -105,7 +104,7 @@ fn run_test(file: String) {
|
||||||
_ => panic!("could not pop directory"),
|
_ => panic!("could not pop directory"),
|
||||||
};
|
};
|
||||||
let output = match Command::new(prc_arg.to_str().unwrap())
|
let output = match Command::new(prc_arg.to_str().unwrap())
|
||||||
.args(args.as_slice())
|
.args(&args)
|
||||||
.stdin(Stdio::null())
|
.stdin(Stdio::null())
|
||||||
.stderr(Stdio::inherit())
|
.stderr(Stdio::inherit())
|
||||||
.output()
|
.output()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue