Stylo: replace uses of mem::uninitialized with MaybeUninit

MozReview-Commit-ID: KGhYL6DJRaR
This commit is contained in:
Simon Sapin 2019-07-06 18:16:30 +02:00
parent 00b3fb49c4
commit 17ec774a49
9 changed files with 60 additions and 68 deletions

View file

@ -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(