mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Stylo: replace uses of mem::uninitialized with MaybeUninit
MozReview-Commit-ID: KGhYL6DJRaR
This commit is contained in:
parent
00b3fb49c4
commit
17ec774a49
9 changed files with 60 additions and 68 deletions
|
@ -112,8 +112,8 @@ macro_rules! define_keyword_type {
|
|||
#[macro_export]
|
||||
macro_rules! profiler_label {
|
||||
($label_type:ident) => {
|
||||
let mut _profiler_label: $crate::gecko_bindings::structs::AutoProfilerLabel =
|
||||
unsafe { ::std::mem::uninitialized() };
|
||||
let mut _profiler_label =
|
||||
::std::mem::MaybeUninit::<$crate::gecko_bindings::structs::AutoProfilerLabel>::uninit();
|
||||
let _profiler_label = if $crate::gecko::profiler::profiler_is_active() {
|
||||
unsafe {
|
||||
Some($crate::gecko::profiler::AutoProfilerLabel::new(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue