Skip to content

Commit 1426427

Browse files
authored
chore: Remove unneeded lazy_static dependency
galileo-map#233
1 parent c7b88a3 commit 1426427

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ image = { version = "0.24", default-features = false }
7575
insta = "1.41"
7676
js-sys = "0.3"
7777
las = "0.8"
78-
lazy_static = "1.4"
7978
log = "0.4"
8079
lyon = "1"
8180
maybe-sync = "0.1"

android_examples/raster_tiles/rust/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ tokio = {version = "1", features = ["rt-multi-thread"]}
1313

1414
# Use this version until https://github.com/sfackler/rust-openssl/issues/2163 is fixed
1515
openssl-sys = "=0.9.92"
16-
lazy_static = "1.4"
1716

1817
[target.'cfg(target_os = "android")'.dependencies]
1918
android-activity = { version = "0.5", features = ["native-activity"] }

galileo/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ galileo-types = { workspace = true }
3535
geojson = { workspace = true, optional = true }
3636
geozero = { workspace = true, features = ["with-geojson", "with-geo"] }
3737
image = { workspace = true, default-features = false, features = ["png", "jpeg"], optional = true }
38-
lazy_static = { workspace = true }
3938
log = { workspace = true }
4039
lyon = { workspace = true, features = ["serialization"] }
4140
nalgebra = { workspace = true }

galileo/src/platform/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
//! Provides platform specific logic and [`PlatformService`] to access it.
22
3+
use std::sync::LazyLock;
4+
35
use async_trait::async_trait;
46
use bytes::Bytes;
5-
use lazy_static::lazy_static;
67

78
use crate::decoded_image::DecodedImage;
89
use crate::error::GalileoError;
@@ -42,9 +43,7 @@ pub mod web;
4243
/// Default implementation of the [`PlatformService`] for the current platform.
4344
pub type PlatformServiceImpl = web::WebPlatformService;
4445

45-
lazy_static! {
46-
static ref SERVICE: PlatformServiceImpl = PlatformServiceImpl::new();
47-
}
46+
static SERVICE: LazyLock<PlatformServiceImpl> = LazyLock::new(PlatformServiceImpl::new);
4847

4948
/// Returns the singleton instance of the platform service
5049
pub fn instance() -> &'static PlatformServiceImpl {

0 commit comments

Comments
 (0)