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:
Luke Parker
2023-06-28 21:16:33 -04:00
parent 8ced63eaac
commit d25c668ee4
17 changed files with 212 additions and 129 deletions

View File

@@ -13,7 +13,8 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[dependencies]
hashbrown = "0.13"
spin = "0.9"
hashbrown = "0.14"
[features]
std = []