mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Fixed some clippy warning by adding default implementations (#31989)
* Fixed some clippy warning by adding default implementations * Updated PR that adds default implementation of structs * Clean up and extend `Default` implementations --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
62a916ce5c
commit
df457c43c8
10 changed files with 28 additions and 71 deletions
|
@ -855,7 +855,7 @@ impl ScriptThreadFactory for ScriptThread {
|
|||
}
|
||||
|
||||
impl ScriptThread {
|
||||
pub fn with_layout<'a, T>(
|
||||
pub fn with_layout<T>(
|
||||
pipeline_id: PipelineId,
|
||||
call: impl FnOnce(&mut dyn Layout) -> T,
|
||||
) -> Result<T, ()> {
|
||||
|
@ -1426,7 +1426,7 @@ impl ScriptThread {
|
|||
|
||||
node_ids: Default::default(),
|
||||
is_user_interacting: Cell::new(false),
|
||||
gpu_id_hub: Arc::new(Mutex::new(Identities::new())),
|
||||
gpu_id_hub: Arc::new(Mutex::new(Identities::default())),
|
||||
webgpu_port: RefCell::new(None),
|
||||
inherited_secure_context: state.inherited_secure_context,
|
||||
layouts: Default::default(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue