Simplify opts.rs

This commit is contained in:
Keegan McAllister 2013-10-22 13:23:54 -07:00
parent dcc697c8b1
commit 67c35ef625

View file

@ -82,19 +82,14 @@ pub fn from_cmdline_args(args: &[~str]) -> Opts {
from_str(period).unwrap() from_str(period).unwrap()
}; };
let exit_after_load = opt_match.opt_present("x");
let headless = opt_match.opt_present("z");
let output_file = opt_match.opt_str("o");
Opts { Opts {
urls: urls, urls: urls,
render_backend: render_backend, render_backend: render_backend,
n_render_threads: n_render_threads, n_render_threads: n_render_threads,
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: opt_match.opt_present("x"),
output_file: output_file, output_file: opt_match.opt_str("o"),
headless: headless, headless: opt_match.opt_present("z"),
} }
} }