mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Replace lazy_static with OnceLock inside monero-serai
lazy_static, if no_std environments were used, effectively required always using spin locks. This resolves the ergonomics of that while adopting Rust std code. no_std does still use a spin based solution. Theoretically, we could use atomics, yet writing our own Mutex wasn't a priority.
This commit is contained in:
@@ -14,8 +14,6 @@ rustdoc-args = ["--cfg", "docsrs"]
|
||||
[dependencies]
|
||||
std-shims = { path = "../../../common/std-shims", version = "0.1", default-features = false }
|
||||
|
||||
lazy_static = "1"
|
||||
|
||||
subtle = { version = "^2.4", default-features = false }
|
||||
|
||||
sha3 = { version = "0.10", default-features = false }
|
||||
@@ -26,6 +24,5 @@ group = { version = "0.13", default-features = false }
|
||||
dalek-ff-group = { path = "../../../crypto/dalek-ff-group", version = "0.3" }
|
||||
|
||||
[features]
|
||||
alloc = ["lazy_static/spin_no_std"]
|
||||
std = ["std-shims/std"]
|
||||
default = ["std"]
|
||||
|
||||
Reference in New Issue
Block a user