From b2ec4cc4bb2e5535769928b561f1c1932a66dcc8 Mon Sep 17 00:00:00 2001 From: Rubens Brandao Date: Fri, 10 May 2024 08:55:09 -0300 Subject: use the new public/private Array trait impl --- rust/src/debuginfo.rs | 8 -------- rust/src/types.rs | 8 ++------ 2 files changed, 2 insertions(+), 14 deletions(-) (limited to 'rust') diff --git a/rust/src/debuginfo.rs b/rust/src/debuginfo.rs index 054e15cd..f29f8ac2 100644 --- a/rust/src/debuginfo.rs +++ b/rust/src/debuginfo.rs @@ -285,14 +285,6 @@ unsafe impl CoreArrayProviderInner for DebugInfoParser { } } -unsafe impl CoreArrayWrapper for DebugInfoParser { - type Wrapped<'a> = Guard<'a, DebugInfoParser>; - - unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, _context: &'a Self::Context) -> Self::Wrapped<'a> { - Guard::new(DebugInfoParser { handle: *raw }, &()) - } -} - /////////////////////// // DebugFunctionInfo diff --git a/rust/src/types.rs b/rust/src/types.rs index 750ca46c..8292db07 100644 --- a/rust/src/types.rs +++ b/rust/src/types.rs @@ -2094,17 +2094,13 @@ impl StructureMember { impl CoreArrayProvider for StructureMember { type Raw = BNStructureMember; type Context = (); + type Wrapped<'a> = Guard<'a, StructureMember>; } -unsafe impl CoreOwnedArrayProvider for StructureMember { +unsafe impl CoreArrayProviderInner for StructureMember { unsafe fn free(raw: *mut Self::Raw, count: usize, _context: &Self::Context) { BNFreeStructureMemberList(raw, count) } -} - -unsafe impl CoreArrayWrapper for StructureMember { - type Wrapped<'a> = Guard<'a, StructureMember>; - unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, _context: &'a Self::Context) -> Self::Wrapped<'a> { Guard::new(StructureMember::from_raw(*raw), &()) } -- cgit v1.3.1