mirror of
https://github.com/extrawurst/gitui.git
synced 2024-11-26 03:00:03 +03:00
switch from lazy_static to once_cell
This commit is contained in:
parent
4249a278b6
commit
5101b39556
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -672,8 +672,8 @@ dependencies = [
|
||||
"fuzzy-matcher",
|
||||
"gh-emoji",
|
||||
"itertools",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"once_cell",
|
||||
"pprof",
|
||||
"pretty_assertions",
|
||||
"rayon-core",
|
||||
|
@ -36,8 +36,8 @@ filetreelist = { path = "./filetreelist", version = "0.5" }
|
||||
fuzzy-matcher = "0.3"
|
||||
gh-emoji = { version = "1.0", optional = true }
|
||||
itertools = "0.10"
|
||||
lazy_static = "1.4"
|
||||
log = "0.4"
|
||||
once_cell = "1"
|
||||
rayon-core = "1.9"
|
||||
ron = "0.8"
|
||||
scopeguard = "1.1"
|
||||
|
@ -1,10 +1,8 @@
|
||||
use lazy_static::lazy_static;
|
||||
use once_cell::sync::Lazy;
|
||||
use std::borrow::Cow;
|
||||
|
||||
lazy_static! {
|
||||
static ref EMOJI_REPLACER: gh_emoji::Replacer =
|
||||
gh_emoji::Replacer::new();
|
||||
}
|
||||
static EMOJI_REPLACER: Lazy<gh_emoji::Replacer> =
|
||||
Lazy::new(gh_emoji::Replacer::new);
|
||||
|
||||
// Replace markdown emojis with Unicode equivalent
|
||||
// :hammer: --> 🔨
|
||||
|
@ -2,7 +2,7 @@ use asyncgit::{
|
||||
asyncjob::{AsyncJob, RunParams},
|
||||
ProgressPercent,
|
||||
};
|
||||
use lazy_static::lazy_static;
|
||||
use once_cell::sync::Lazy;
|
||||
use scopetime::scope_time;
|
||||
use std::{
|
||||
ffi::OsStr,
|
||||
@ -32,11 +32,9 @@ pub struct SyntaxText {
|
||||
path: PathBuf,
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
static ref SYNTAX_SET: SyntaxSet =
|
||||
SyntaxSet::load_defaults_nonewlines();
|
||||
static ref THEME_SET: ThemeSet = ThemeSet::load_defaults();
|
||||
}
|
||||
static SYNTAX_SET: Lazy<SyntaxSet> =
|
||||
Lazy::new(SyntaxSet::load_defaults_nonewlines);
|
||||
static THEME_SET: Lazy<ThemeSet> = Lazy::new(ThemeSet::load_defaults);
|
||||
|
||||
pub struct AsyncProgressBuffer {
|
||||
current: usize,
|
||||
|
Loading…
Reference in New Issue
Block a user