mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
clippy: refactor struct literals to use shorthands (#31924)
This commit is contained in:
parent
0728378424
commit
9303c90159
3 changed files with 23 additions and 27 deletions
|
@ -209,7 +209,7 @@ impl DerefMut for ScriptReflowResult {
|
|||
impl ScriptReflowResult {
|
||||
fn new(script_reflow: ScriptReflow) -> ScriptReflowResult {
|
||||
ScriptReflowResult {
|
||||
script_reflow: script_reflow,
|
||||
script_reflow,
|
||||
result: RefCell::new(Some(Default::default())),
|
||||
}
|
||||
}
|
||||
|
@ -416,7 +416,7 @@ impl LayoutThread {
|
|||
inner_window_dimensions_response: None,
|
||||
})),
|
||||
webrender_image_cache: Default::default(),
|
||||
paint_time_metrics: paint_time_metrics,
|
||||
paint_time_metrics,
|
||||
last_iframe_sizes: Default::default(),
|
||||
debug: opts::get().debug.clone(),
|
||||
}
|
||||
|
@ -450,7 +450,7 @@ impl LayoutThread {
|
|||
registered_speculative_painters: &self.registered_painters,
|
||||
current_time_for_animations: animation_timeline_value,
|
||||
traversal_flags,
|
||||
snapshot_map: snapshot_map,
|
||||
snapshot_map,
|
||||
},
|
||||
image_cache: self.image_cache.clone(),
|
||||
font_cache_thread: Mutex::new(self.font_cache_thread.clone()),
|
||||
|
@ -1291,8 +1291,8 @@ fn get_ua_stylesheets() -> Result<UserAgentStylesheets, &'static str> {
|
|||
|
||||
Ok(UserAgentStylesheets {
|
||||
shared_lock: shared_lock.clone(),
|
||||
user_or_user_agent_stylesheets: user_or_user_agent_stylesheets,
|
||||
quirks_mode_stylesheet: quirks_mode_stylesheet,
|
||||
user_or_user_agent_stylesheets,
|
||||
quirks_mode_stylesheet,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue