From ea7a22b16fc56c23af397dd690c6c839dfb3a8f1 Mon Sep 17 00:00:00 2001 From: Rubens Brandao Date: Fri, 3 May 2024 13:28:53 -0300 Subject: hide array implementation details --- rust/src/section.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'rust/src/section.rs') diff --git a/rust/src/section.rs b/rust/src/section.rs index 580d5a21..1e45db8b 100644 --- a/rust/src/section.rs +++ b/rust/src/section.rs @@ -174,17 +174,13 @@ unsafe impl RefCountable for Section { impl CoreArrayProvider for Section { type Raw = *mut BNSection; type Context = (); + type Wrapped<'a> = Guard<'a, Section>; } -unsafe impl CoreOwnedArrayProvider for Section { +unsafe impl CoreArrayProviderInner for Section { unsafe fn free(raw: *mut Self::Raw, count: usize, _context: &Self::Context) { BNFreeSectionList(raw, count); } -} - -unsafe impl CoreArrayWrapper for Section { - type Wrapped<'a> = Guard<'a, Section>; - unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, context: &'a Self::Context) -> Self::Wrapped<'a> { Guard::new(Section::from_raw(*raw), context) } -- cgit v1.3.1