chore: remove once_cell dependency

This commit is contained in:
Tommy Volk 2024-10-03 22:27:25 -05:00 committed by Héctor Ramón Jiménez
parent b156087fcf
commit 0e8c3fe30f
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
20 changed files with 80 additions and 96 deletions

View file

@ -166,10 +166,10 @@ impl Default for Theme {
fn default() -> Self {
#[cfg(feature = "auto-detect-theme")]
{
use once_cell::sync::Lazy;
use std::sync::LazyLock;
static DEFAULT: Lazy<Theme> =
Lazy::new(|| match dark_light::detect() {
static DEFAULT: LazyLock<Theme> =
LazyLock::new(|| match dark_light::detect() {
dark_light::Mode::Dark => Theme::Dark,
dark_light::Mode::Light | dark_light::Mode::Default => {
Theme::Light