aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/installed_versions.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/installed_versions.rs')
-rw-r--r--crates/shirabe/src/installed_versions.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/shirabe/src/installed_versions.rs b/crates/shirabe/src/installed_versions.rs
index b151d96..c79e9d8 100644
--- a/crates/shirabe/src/installed_versions.rs
+++ b/crates/shirabe/src/installed_versions.rs
@@ -38,8 +38,9 @@ static CAN_GET_VENDORS: Mutex<Option<bool>> = Mutex::new(None);
/// @var array[]
/// @psalm-var array<string, array{...}>
-static INSTALLED_BY_VENDOR: Mutex<IndexMap<String, IndexMap<String, PhpMixed>>> =
- Mutex::new(IndexMap::new());
+static INSTALLED_BY_VENDOR: std::sync::LazyLock<
+ Mutex<IndexMap<String, IndexMap<String, PhpMixed>>>,
+> = std::sync::LazyLock::new(|| Mutex::new(IndexMap::new()));
impl InstalledVersions {
/// Returns a list of all package names which are present, either by being installed, replaced or provided