[PATCH v2 4/5] rust: maple_tree: add MapleTreeAlloc

Danilo Krummrich dakr at kernel.org
Tue Aug 19 04:38:42 PDT 2025


On Tue Aug 19, 2025 at 12:34 PM CEST, Alice Ryhl wrote:
> To support allocation trees, we introduce a new type MapleTreeAlloc for
> the case where the tree is created using MT_FLAGS_ALLOC_RANGE. To ensure
> that you can only call mtree_alloc_range on an allocation tree, we
> restrict thta method to the new MapleTreeAlloc type. However, all
> methods on MapleTree remain accessible to MapleTreeAlloc as allocation
> trees can use the other methods without issues.
>
> Signed-off-by: Alice Ryhl <aliceryhl at google.com>

Without the unwrap() calls in the examples,

Reviewed-by: Danilo Krummrich <dakr at kernel.org>



More information about the maple-tree mailing list