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/callingconvention.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'rust/src/callingconvention.rs') diff --git a/rust/src/callingconvention.rs b/rust/src/callingconvention.rs index 723a7cfa..e7888131 100644 --- a/rust/src/callingconvention.rs +++ b/rust/src/callingconvention.rs @@ -26,7 +26,7 @@ use binaryninjacore_sys::*; use crate::architecture::{Architecture, ArchitectureExt, CoreArchitecture, Register}; use crate::rc::{ - CoreArrayProvider, CoreArrayWrapper, CoreOwnedArrayProvider, Guard, Ref, RefCountable, + CoreArrayProvider, CoreArrayProviderInner, Guard, Ref, RefCountable, }; use crate::string::*; @@ -678,17 +678,13 @@ unsafe impl RefCountable for CallingConvention { impl CoreArrayProvider for CallingConvention { type Raw = *mut BNCallingConvention; type Context = A::Handle; + type Wrapped<'a> = Guard<'a, CallingConvention>; } -unsafe impl CoreOwnedArrayProvider for CallingConvention { +unsafe impl CoreArrayProviderInner for CallingConvention { unsafe fn free(raw: *mut *mut BNCallingConvention, count: usize, _content: &Self::Context) { BNFreeCallingConventionList(raw, count); } -} - -unsafe impl CoreArrayWrapper for CallingConvention { - type Wrapped<'a> = Guard<'a, CallingConvention>; - unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, context: &'a Self::Context) -> Self::Wrapped<'a> { Guard::new( CallingConvention { -- cgit v1.3.1