clippy: refactor struct literals to use shorthands (#31924)

This commit is contained in:
Azhar Ismagulova 2024-03-28 16:39:50 +00:00 committed by GitHub
parent 0728378424
commit 9303c90159
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 27 deletions

View file

@ -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,
})
}