oxc/crates/oxc_data_structures/src/stack/mod.rs
overlookmotel 9c1844a8a7 refactor(data_structures): remove NonNull shim (#8423)
The `NonNull` shim in `oxc_data_structures` was just to emulate native APIs which only became stable in Rust 1.80.0. #8407 bumped our MSRV to 1.80.0, so now we can remove the shim and use `std::ptr::NonNull` directly.
2025-01-11 01:18:53 +00:00

19 lines
656 B
Rust

//! Contains the following FILO data structures:
//!
//! * [`Stack`]: A growable stack, equivalent to [`Vec`], but more efficient for stack usage (push/pop).
//! * [`NonEmptyStack`]: A growable stack that can never be empty, allowing for more efficient operations
//! (very fast `last` / `last_mut`).
//! * [`SparseStack`]: A growable stack of `Option`s, optimized for low memory usage when many entries in
//! the stack are empty (`None`).
mod capacity;
mod common;
mod non_empty;
mod sparse;
mod standard;
use capacity::StackCapacity;
use common::StackCommon;
pub use non_empty::NonEmptyStack;
pub use sparse::SparseStack;
pub use standard::Stack;