Re: [PATCH v2 4/5] rust: maple_tree: add MapleTreeAlloc
From: Danilo Krummrich
Date: Tue Aug 19 2025 - 07:41:52 EST
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@xxxxxxxxxx>
Without the unwrap() calls in the examples,
Reviewed-by: Danilo Krummrich <dakr@xxxxxxxxxx>