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/relocation.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'rust/src/relocation.rs') diff --git a/rust/src/relocation.rs b/rust/src/relocation.rs index 17fd5958..f9ece043 100644 --- a/rust/src/relocation.rs +++ b/rust/src/relocation.rs @@ -4,7 +4,7 @@ use crate::{ architecture::{Architecture, CoreArchitecture}, binaryview::BinaryView, llil, - rc::{CoreArrayProvider, CoreArrayWrapper, CoreOwnedArrayProvider, Ref, RefCountable}, + rc::{CoreArrayProvider, CoreArrayProviderInner, Ref, RefCountable}, symbol::Symbol, }; use binaryninjacore_sys::*; @@ -221,16 +221,13 @@ impl Relocation { impl CoreArrayProvider for Relocation { type Raw = *mut BNRelocation; type Context = (); + type Wrapped<'a> = Guard<'a, Relocation>; } -unsafe impl CoreOwnedArrayProvider for Relocation { +unsafe impl CoreArrayProviderInner for Relocation { unsafe fn free(raw: *mut Self::Raw, count: usize, _context: &Self::Context) { BNFreeRelocationList(raw, count); } -} - -unsafe impl CoreArrayWrapper for Relocation { - type Wrapped<'a> = Guard<'a, Relocation>; unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, _context: &'a Self::Context) -> Self::Wrapped<'a> { Guard::new(Relocation(*raw), &()) } -- cgit v1.3.1