mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Replaced some Opts struct fields with shorthand initializers.
This commit is contained in:
parent
3a99a733cd
commit
6347bcf83f
1 changed files with 16 additions and 16 deletions
|
@ -784,7 +784,7 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR
|
||||||
bubble_inline_sizes_separately = true;
|
bubble_inline_sizes_separately = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
let (devtools_enabled, devtools_port) = if opt_match.opt_present("devtools") {
|
let (devtools_server_enabled, devtools_port) = if opt_match.opt_present("devtools") {
|
||||||
let port = opt_match
|
let port = opt_match
|
||||||
.opt_str("devtools")
|
.opt_str("devtools")
|
||||||
.map(|port| {
|
.map(|port| {
|
||||||
|
@ -847,37 +847,37 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR
|
||||||
let is_printing_version = opt_match.opt_present("v") || opt_match.opt_present("version");
|
let is_printing_version = opt_match.opt_present("v") || opt_match.opt_present("version");
|
||||||
|
|
||||||
let opts = Opts {
|
let opts = Opts {
|
||||||
is_running_problem_test: is_running_problem_test,
|
is_running_problem_test,
|
||||||
url: url_opt,
|
url: url_opt,
|
||||||
tile_size: tile_size,
|
tile_size,
|
||||||
time_profiling: time_profiling,
|
time_profiling,
|
||||||
time_profiler_trace_path: opt_match.opt_str("profiler-trace-path"),
|
time_profiler_trace_path: opt_match.opt_str("profiler-trace-path"),
|
||||||
mem_profiler_period: mem_profiler_period,
|
mem_profiler_period,
|
||||||
nonincremental_layout: nonincremental_layout,
|
nonincremental_layout,
|
||||||
userscripts: opt_match.opt_default("userscripts", ""),
|
userscripts: opt_match.opt_default("userscripts", ""),
|
||||||
user_stylesheets: user_stylesheets,
|
user_stylesheets,
|
||||||
output_file: opt_match.opt_str("o"),
|
output_file: opt_match.opt_str("o"),
|
||||||
replace_surrogates: debug_options.replace_surrogates,
|
replace_surrogates: debug_options.replace_surrogates,
|
||||||
gc_profile: debug_options.gc_profile,
|
gc_profile: debug_options.gc_profile,
|
||||||
load_webfonts_synchronously: debug_options.load_webfonts_synchronously,
|
load_webfonts_synchronously: debug_options.load_webfonts_synchronously,
|
||||||
headless: opt_match.opt_present("z"),
|
headless: opt_match.opt_present("z"),
|
||||||
hard_fail: opt_match.opt_present("f") && !opt_match.opt_present("F"),
|
hard_fail: opt_match.opt_present("f") && !opt_match.opt_present("F"),
|
||||||
bubble_inline_sizes_separately: bubble_inline_sizes_separately,
|
bubble_inline_sizes_separately,
|
||||||
profile_script_events: debug_options.profile_script_events,
|
profile_script_events: debug_options.profile_script_events,
|
||||||
trace_layout: debug_options.trace_layout,
|
trace_layout: debug_options.trace_layout,
|
||||||
devtools_port: devtools_port,
|
devtools_port,
|
||||||
devtools_server_enabled: devtools_enabled,
|
devtools_server_enabled,
|
||||||
webdriver_port: webdriver_port,
|
webdriver_port,
|
||||||
initial_window_size: initial_window_size,
|
initial_window_size,
|
||||||
multiprocess: opt_match.opt_present("M"),
|
multiprocess: opt_match.opt_present("M"),
|
||||||
background_hang_monitor: opt_match.opt_present("B"),
|
background_hang_monitor: opt_match.opt_present("B"),
|
||||||
sandbox: opt_match.opt_present("S"),
|
sandbox: opt_match.opt_present("S"),
|
||||||
random_pipeline_closure_probability: random_pipeline_closure_probability,
|
random_pipeline_closure_probability,
|
||||||
random_pipeline_closure_seed: random_pipeline_closure_seed,
|
random_pipeline_closure_seed,
|
||||||
show_debug_fragment_borders: debug_options.show_fragment_borders,
|
show_debug_fragment_borders: debug_options.show_fragment_borders,
|
||||||
show_debug_parallel_layout: debug_options.show_parallel_layout,
|
show_debug_parallel_layout: debug_options.show_parallel_layout,
|
||||||
enable_text_antialiasing: !debug_options.disable_text_aa,
|
enable_text_antialiasing: !debug_options.disable_text_aa,
|
||||||
enable_subpixel_text_antialiasing: enable_subpixel_text_antialiasing,
|
enable_subpixel_text_antialiasing,
|
||||||
enable_canvas_antialiasing: !debug_options.disable_canvas_aa,
|
enable_canvas_antialiasing: !debug_options.disable_canvas_aa,
|
||||||
dump_style_tree: debug_options.dump_style_tree,
|
dump_style_tree: debug_options.dump_style_tree,
|
||||||
dump_rule_tree: debug_options.dump_rule_tree,
|
dump_rule_tree: debug_options.dump_rule_tree,
|
||||||
|
@ -892,7 +892,7 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR
|
||||||
webrender_stats: debug_options.webrender_stats,
|
webrender_stats: debug_options.webrender_stats,
|
||||||
config_dir: opt_match.opt_str("config-dir").map(Into::into),
|
config_dir: opt_match.opt_str("config-dir").map(Into::into),
|
||||||
full_backtraces: debug_options.full_backtraces,
|
full_backtraces: debug_options.full_backtraces,
|
||||||
is_printing_version: is_printing_version,
|
is_printing_version,
|
||||||
webrender_record: debug_options.webrender_record,
|
webrender_record: debug_options.webrender_record,
|
||||||
webrender_batch: !debug_options.webrender_disable_batch,
|
webrender_batch: !debug_options.webrender_disable_batch,
|
||||||
shaders_dir: opt_match.opt_str("shaders").map(Into::into),
|
shaders_dir: opt_match.opt_str("shaders").map(Into::into),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue