Enable -o option for output_file.

This commit is contained in:
Jack Moffitt 2013-07-16 09:47:48 -06:00
parent e9b1657df6
commit 092e887bda

View file

@ -20,6 +20,7 @@ pub struct Opts {
tile_size: uint,
profiler_period: Option<float>,
exit_after_load: bool,
output_file: Option<~str>,
}
#[allow(non_implicitly_copyable_typarams)]
@ -48,10 +49,6 @@ pub fn from_cmdline_args(args: &[~str]) -> Opts {
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") {
Some(backend_str) => {
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 output_file = getopts::opt_maybe_str(&opt_match, "o");
Opts {
urls: urls,
render_backend: render_backend,
@ -97,5 +96,6 @@ pub fn from_cmdline_args(args: &[~str]) -> Opts {
tile_size: tile_size,
profiler_period: profiler_period,
exit_after_load: exit_after_load,
output_file: output_file,
}
}