- Replaced `InternalNode` with a unified `LeafNode` structure to simplify the node hierarchy and reduce redundancy. - Introduced `capacity` field in `LeafNode` to dynamically manage keys and edges, replacing fixed-size arrays. - Added methods for growing node capacity and handling dynamic memory allocation for keys and edges. - Updated `NodeRef` methods to work with the new `LeafNode` structure, including safe handling of raw pointers and memory operations. - Adjusted tests to reflect the new node structure and ensure correctness.
40 lines
802 B
Rust
40 lines
802 B
Rust
#![cfg_attr(not(feature = "std"), no_std)]
|
|
#![cfg_attr(
|
|
feature = "nightly",
|
|
feature(
|
|
strict_provenance_atomic_ptr,
|
|
box_vec_non_null,
|
|
maybe_uninit_slice,
|
|
debug_closure_helpers,
|
|
slice_ptr_get,
|
|
)
|
|
)]
|
|
#![cfg_attr(feature = "transposed-option", feature(try_trait_v2))]
|
|
|
|
#[cfg(any(test, feature = "std", feature = "alloc"))]
|
|
extern crate alloc;
|
|
|
|
#[cfg(any(test, feature = "std"))]
|
|
extern crate std;
|
|
|
|
pub mod atomic;
|
|
pub mod bytes;
|
|
pub mod cachepadded;
|
|
pub mod drop_guard;
|
|
pub mod iter;
|
|
pub mod mem;
|
|
#[cfg(feature = "transposed-option")]
|
|
pub mod option;
|
|
pub mod ptr;
|
|
pub mod rand;
|
|
#[cfg(feature = "alloc")]
|
|
pub mod smallbox;
|
|
pub mod sync;
|
|
pub mod util;
|
|
|
|
#[cfg(feature = "alloc")]
|
|
pub mod tree;
|
|
|
|
pub use cachepadded::CachePadded;
|
|
pub use mem::can_transmute;
|