smoldot icon indicating copy to clipboard operation
smoldot copied to clipboard

Remove usage of lazy_static!

Open tomaka opened this issue 3 years ago • 1 comments

As of Rust 1.63, Mutex::new is now const. This means that we no longer need lazy_static in order to have a static variable containing a Mutex.

It is however not really possible yet to remove lazy_static because we're using some non-const functions such as BinaryHeap::new or BTreeMap::new.

tomaka avatar Aug 11 '22 15:08 tomaka

BTreeMap::new will be stable in an upcoming version: https://github.com/rust-lang/rust/pull/102197

tomaka avatar Oct 25 '22 10:10 tomaka