Replace `once_cell` with `std::sync::OnceLock`/`core::cell::OnceCell` by youknowone · Pull Request #7077 · RustPython/RustPython
- Replace `once_cell::sync::{Lazy, OnceCell}` with
`std::sync::{LazyLock, OnceLock}`
- Replace `once_cell::unsync::{Lazy, OnceCell}` with
`core::cell::{LazyCell, OnceCell}`
- Inline `get_or_try_init` at call sites (unstable in std as of 1.93)
- Replace `OnceCell::with_value()` with `OnceCell::from()` in codecs.rs
- Remove `once_cell` direct dependency from common and vm crates
marked this pull request as ready for review
youknowone added a commit to youknowone/RustPython that referenced this pull request
…RustPython#7077) * Replace `once_cell` with `std::sync::OnceLock`/`core::cell::OnceCell` - Replace `once_cell::sync::{Lazy, OnceCell}` with `std::sync::{LazyLock, OnceLock}` - Replace `once_cell::unsync::{Lazy, OnceCell}` with `core::cell::{LazyCell, OnceCell}` - Inline `get_or_try_init` at call sites (unstable in std as of 1.93) - Replace `OnceCell::with_value()` with `OnceCell::from()` in codecs.rs - Remove `once_cell` direct dependency from common and vm crates * Auto-format: cargo fmt --all --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters