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/custombinaryview.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'rust/src/custombinaryview.rs') diff --git a/rust/src/custombinaryview.rs b/rust/src/custombinaryview.rs index 4c645ffd..05f1acb8 100644 --- a/rust/src/custombinaryview.rs +++ b/rust/src/custombinaryview.rs @@ -290,17 +290,13 @@ impl BinaryViewTypeBase for BinaryViewType { impl CoreArrayProvider for BinaryViewType { type Raw = *mut BNBinaryViewType; type Context = (); + type Wrapped<'a> = Guard<'a, BinaryViewType>; } -unsafe impl CoreOwnedArrayProvider for BinaryViewType { +unsafe impl CoreArrayProviderInner for BinaryViewType { unsafe fn free(raw: *mut Self::Raw, _count: usize, _context: &Self::Context) { BNFreeBinaryViewTypeList(raw); } -} - -unsafe impl CoreArrayWrapper for BinaryViewType { - type Wrapped<'a> = Guard<'a, BinaryViewType>; - unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, _context: &'a Self::Context) -> Self::Wrapped<'a> { Guard::new(BinaryViewType(*raw), &()) } -- cgit v1.3.1