diff options
Diffstat (limited to 'rust/src/metadata.rs')
| -rw-r--r-- | rust/src/metadata.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/rust/src/metadata.rs b/rust/src/metadata.rs index 6f026a04..8cb32d72 100644 --- a/rust/src/metadata.rs +++ b/rust/src/metadata.rs @@ -1,6 +1,4 @@ -use crate::rc::{ - Array, CoreArrayProvider, CoreArrayWrapper, CoreOwnedArrayProvider, Guard, Ref, RefCountable, -}; +use crate::rc::{Array, CoreArrayProvider, Guard, CoreArrayProviderInner, Ref, RefCountable}; use crate::string::{BnStrCompatible, BnString}; use binaryninjacore_sys::*; use std::collections::HashMap; @@ -335,17 +333,13 @@ unsafe impl RefCountable for Metadata { impl CoreArrayProvider for Metadata { type Raw = *mut BNMetadata; type Context = (); + type Wrapped<'a> = Guard<'a, Metadata>; } -unsafe impl CoreOwnedArrayProvider for Metadata { +unsafe impl CoreArrayProviderInner for Metadata { unsafe fn free(raw: *mut *mut BNMetadata, _count: usize, _context: &()) { BNFreeMetadataArray(raw); } -} - -unsafe impl CoreArrayWrapper for Metadata { - type Wrapped<'a> = Guard<'a, Metadata>; - unsafe fn wrap_raw<'a>(raw: &'a *mut BNMetadata, context: &'a ()) -> Self::Wrapped<'a> { Guard::new(Metadata::from_raw(*raw), context) } |
