Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1ffcf65 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Use std::sync::LazyLock rather than once_cell." into main am: 12016e29

parents 55c73dd0 12016e29
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ rust_defaults {
    rustlibs: [
        "libcrossbeam_queue",
        "libparking_lot",
        "libonce_cell",
        "libcxx",
    ],
    shared_libs: ["libutils"],
+5 −3
Original line number Diff line number Diff line
@@ -17,12 +17,14 @@ use super::event::Event;
use super::event_type::EventType;
use super::storage::Storage;
use crate::cxxffi::uptimeMillis;
use once_cell::sync::Lazy;
use std::fmt;
use std::sync::atomic::{AtomicU64, Ordering};
use std::sync::{
    atomic::{AtomicU64, Ordering},
    LazyLock,
};

//  Lazily initialized static instance of DebugStore.
static INSTANCE: Lazy<DebugStore> = Lazy::new(DebugStore::new);
static INSTANCE: LazyLock<DebugStore> = LazyLock::new(DebugStore::new);

/// The `DebugStore` struct is responsible for managing debug events and data.
pub struct DebugStore {