paths: Replace lazy_static!
with OnceLock
(#13213)
This PR replaces the `lazy_static!` usages in the `paths` crate with `OnceLock` from the standard library. This allows us to drop the `lazy_static` dependency from this crate. The paths are now exposed as accessor functions that reference a private static value. Release Notes: - N/A
This commit is contained in:
parent
ba59e66314
commit
81475ac4cd
27 changed files with 322 additions and 172 deletions
|
@ -36,7 +36,6 @@ use language::{
|
|||
LanguageConfig, LanguageMatcher, LanguageQueries, LanguageRegistry, QUERY_FILENAME_PREFIXES,
|
||||
};
|
||||
use node_runtime::NodeRuntime;
|
||||
use paths::EXTENSIONS_DIR;
|
||||
use project::ContextProviderWithTasks;
|
||||
use release_channel::ReleaseChannel;
|
||||
use semantic_version::SemanticVersion;
|
||||
|
@ -180,7 +179,7 @@ pub fn init(
|
|||
|
||||
let store = cx.new_model(move |cx| {
|
||||
ExtensionStore::new(
|
||||
EXTENSIONS_DIR.clone(),
|
||||
paths::extensions_dir().clone(),
|
||||
None,
|
||||
fs,
|
||||
client.http_client().clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue