summaryrefslogtreecommitdiff
path: root/rust/src/metadata.rs
diff options
context:
space:
mode:
authorRubens Brandao <git@rubens.io>2024-05-03 13:28:53 -0300
committerKyle Martin <krm504@nyu.edu>2024-05-10 12:00:27 -0400
commitea7a22b16fc56c23af397dd690c6c839dfb3a8f1 (patch)
tree45f3ba19172017694388ab6f7266e23df76bb670 /rust/src/metadata.rs
parent015314d34d073a8ebbd958edf8150a81381f12c2 (diff)
hide array implementation details
Diffstat (limited to 'rust/src/metadata.rs')
-rw-r--r--rust/src/metadata.rs12
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)
}