Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use std::sync::LazyLock instead of lazy_static #453

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ flate2 = "1.0"
fs_extra = "1.3.0"
futures = "0.3"
iced_aw = { git = "https://github.com/iced-rs/iced_aw.git", rev = "9ed46bffd0d819f22e07db6c282fbef733007df5", default-features = false, features = ["tabs", "icons"] }
lazy_static = "1.5"
log = { version = "0.4.22", features = ["std"] }
open = "5"
parse_link_header = "0.3"
Expand Down
6 changes: 2 additions & 4 deletions src/plugins_frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ use anyhow::Result;
use espim::Plugin as EspimPlugin;
use iced::widget::{button, image, Column, Container, Image, Row, Scrollable, Space, Text};
use iced::{alignment, theme, Alignment, Color, Command, Element, Length};
use lazy_static::lazy_static;
use regex::Regex;
use std::fs::File;
use std::io::{Read, Write};
use std::path::PathBuf;
use std::sync::LazyLock;

lazy_static! {
static ref CACHE_FILENAME_REGEX: Regex = Regex::new(r"[^\w.-]").unwrap();
}
static CACHE_FILENAME_REGEX: LazyLock<Regex> = LazyLock::new(|| Regex::new(r"[^\w.-]").unwrap());

#[derive(Debug, Clone)]
pub enum PluginsFrameState {
Expand Down