Skip to content

Commit

Permalink
Merge pull request #1320 from panekj/fix/lazy-static
Browse files Browse the repository at this point in the history
fix: replace lazy_static
  • Loading branch information
dzhou121 authored Sep 22, 2022
2 parents d6f1266 + 7c7ef50 commit 7b98177
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 12 deletions.
7 changes: 3 additions & 4 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion lapce-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ thiserror = "1.0"
itertools = "0.10.3"
log = "0.4.14"
bitflags = "1.3.2"
once_cell = "1.13.0"
once_cell = "1.15"
slotmap = "1.0"
arc-swap = "1.5.1"
strum = "0.24.0"
Expand Down
1 change: 0 additions & 1 deletion lapce-data/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ thiserror = "1.0"
anyhow = "1.0.32"
strum = "0.24.0"
strum_macros = "0.24"
lazy_static = "1.4.0"
serde = "1.0"
serde_json = "1.0"
notify = { version = "5.0.0-pre.13", features = ["serde"] }
Expand Down
2 changes: 1 addition & 1 deletion lapce-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
interprocess = "1.1.1"
clap = { version = "3.2.17", features = ["derive"] }
process_path = "0.1.4"
once_cell = "1.13.1"
once_cell = "1.15"
url = "2.2.2"
dyn-clone = "1.0.8"
which = "4.2.5"
Expand Down
2 changes: 1 addition & 1 deletion lapce-ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ include_dir = "0.6.0"
anyhow = "1.0.32"
strum = "0.24.0"
strum_macros = "0.24"
lazy_static = "1.4.0"
once_cell = "1.15"
serde = "1.0"
serde_json = "1.0"
notify = "5.0.0-pre.13"
Expand Down
6 changes: 2 additions & 4 deletions lapce-ui/src/svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ use std::{collections::HashMap, ffi::OsStr, path::Path, str::FromStr};

use druid::{piet::Svg, Color};
use include_dir::{include_dir, Dir};
use lazy_static::lazy_static;
use lsp_types::{CompletionItemKind, SymbolKind};
use once_cell::sync::Lazy;

use lapce_data::config::{Config, LOGO};

const ICONS_DIR: Dir = include_dir!("../icons");

lazy_static! {
static ref SVG_STORE: SvgStore = SvgStore::new();
}
static SVG_STORE: Lazy<SvgStore> = Lazy::new(SvgStore::new);

struct SvgStore {
svgs: HashMap<&'static str, Option<Svg>>,
Expand Down

0 comments on commit 7b98177

Please sign in to comment.