summaryrefslogtreecommitdiff
path: root/rust/src/function.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/function.rs')
-rw-r--r--rust/src/function.rs16
1 files changed, 4 insertions, 12 deletions
diff --git a/rust/src/function.rs b/rust/src/function.rs
index 74e05ea5..f57d2fe3 100644
--- a/rust/src/function.rs
+++ b/rust/src/function.rs
@@ -414,17 +414,13 @@ unsafe impl RefCountable for Function {
impl CoreArrayProvider for Function {
type Raw = *mut BNFunction;
type Context = ();
+ type Wrapped<'a> = Guard<'a, Function>;
}
-unsafe impl CoreOwnedArrayProvider for Function {
+unsafe impl CoreArrayProviderInner for Function {
unsafe fn free(raw: *mut *mut BNFunction, count: usize, _context: &()) {
BNFreeFunctionList(raw, count);
}
-}
-
-unsafe impl CoreArrayWrapper for Function {
- type Wrapped<'a> = Guard<'a, Function>;
-
unsafe fn wrap_raw<'a>(raw: &'a *mut BNFunction, context: &'a ()) -> Self::Wrapped<'a> {
Guard::new(Function { handle: *raw }, context)
}
@@ -469,16 +465,12 @@ impl AddressRange {
impl CoreArrayProvider for AddressRange {
type Raw = BNAddressRange;
type Context = ();
+ type Wrapped<'a> = &'a AddressRange;
}
-unsafe impl CoreOwnedArrayProvider for AddressRange {
+unsafe impl CoreArrayProviderInner for AddressRange {
unsafe fn free(raw: *mut Self::Raw, _count: usize, _context: &Self::Context) {
BNFreeAddressRanges(raw);
}
-}
-
-unsafe impl CoreArrayWrapper for AddressRange {
- type Wrapped<'a> = &'a AddressRange;
-
unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, _context: &'a Self::Context) -> Self::Wrapped<'a> {
mem::transmute(raw)
}