mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Enable -o
option for output_file.
This commit is contained in:
parent
e9b1657df6
commit
092e887bda
1 changed files with 4 additions and 4 deletions
|
@ -20,6 +20,7 @@ pub struct Opts {
|
||||||
tile_size: uint,
|
tile_size: uint,
|
||||||
profiler_period: Option<float>,
|
profiler_period: Option<float>,
|
||||||
exit_after_load: bool,
|
exit_after_load: bool,
|
||||||
|
output_file: Option<~str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(non_implicitly_copyable_typarams)]
|
#[allow(non_implicitly_copyable_typarams)]
|
||||||
|
@ -48,10 +49,6 @@ pub fn from_cmdline_args(args: &[~str]) -> Opts {
|
||||||
copy opt_match.free
|
copy opt_match.free
|
||||||
};
|
};
|
||||||
|
|
||||||
if getopts::opt_present(&opt_match, "o") {
|
|
||||||
fail!(~"servo cannot treat 'o' option now.")
|
|
||||||
}
|
|
||||||
|
|
||||||
let render_backend = match getopts::opt_maybe_str(&opt_match, "r") {
|
let render_backend = match getopts::opt_maybe_str(&opt_match, "r") {
|
||||||
Some(backend_str) => {
|
Some(backend_str) => {
|
||||||
if backend_str == ~"direct2d" {
|
if backend_str == ~"direct2d" {
|
||||||
|
@ -90,6 +87,8 @@ pub fn from_cmdline_args(args: &[~str]) -> Opts {
|
||||||
|
|
||||||
let exit_after_load = getopts::opt_present(&opt_match, "x");
|
let exit_after_load = getopts::opt_present(&opt_match, "x");
|
||||||
|
|
||||||
|
let output_file = getopts::opt_maybe_str(&opt_match, "o");
|
||||||
|
|
||||||
Opts {
|
Opts {
|
||||||
urls: urls,
|
urls: urls,
|
||||||
render_backend: render_backend,
|
render_backend: render_backend,
|
||||||
|
@ -97,5 +96,6 @@ pub fn from_cmdline_args(args: &[~str]) -> Opts {
|
||||||
tile_size: tile_size,
|
tile_size: tile_size,
|
||||||
profiler_period: profiler_period,
|
profiler_period: profiler_period,
|
||||||
exit_after_load: exit_after_load,
|
exit_after_load: exit_after_load,
|
||||||
|
output_file: output_file,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue