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/platform.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'rust/src/platform.rs') diff --git a/rust/src/platform.rs b/rust/src/platform.rs index 42e2f80c..11f76284 100644 --- a/rust/src/platform.rs +++ b/rust/src/platform.rs @@ -365,17 +365,13 @@ unsafe impl RefCountable for Platform { impl CoreArrayProvider for Platform { type Raw = *mut BNPlatform; type Context = (); + type Wrapped<'a> = Guard<'a, Platform>; } -unsafe impl CoreOwnedArrayProvider for Platform { +unsafe impl CoreArrayProviderInner for Platform { unsafe fn free(raw: *mut *mut BNPlatform, count: usize, _context: &()) { BNFreePlatformList(raw, count); } -} - -unsafe impl CoreArrayWrapper for Platform { - type Wrapped<'a> = Guard<'a, Platform>; - unsafe fn wrap_raw<'a>(raw: &'a *mut BNPlatform, context: &'a ()) -> Self::Wrapped<'a> { debug_assert!(!raw.is_null()); Guard::new(Platform { handle: *raw }, context) -- cgit v1.3.1