mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
stylo: Use Arc::get_mut().unwrap() instead of make_mut.
It's infallible, so no point in using make_mut.
This commit is contained in:
parent
010bce128b
commit
6bce4c8c20
1 changed files with 1 additions and 1 deletions
|
@ -425,7 +425,7 @@ impl ${style_struct.gecko_struct_name} {
|
||||||
pub fn initial() -> Arc<Self> {
|
pub fn initial() -> Arc<Self> {
|
||||||
let mut result = Arc::new(${style_struct.gecko_struct_name} { gecko: unsafe { zeroed() } });
|
let mut result = Arc::new(${style_struct.gecko_struct_name} { gecko: unsafe { zeroed() } });
|
||||||
unsafe {
|
unsafe {
|
||||||
Gecko_Construct_${style_struct.gecko_ffi_name}(&mut Arc::make_mut(&mut result).gecko);
|
Gecko_Construct_${style_struct.gecko_ffi_name}(&mut Arc::get_mut(&mut result).unwrap().gecko);
|
||||||
}
|
}
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue