Skip to content

Commit

Permalink
use the new public/private Array trait impl
Browse files Browse the repository at this point in the history
  • Loading branch information
rbran authored and ElykDeer committed May 10, 2024
1 parent ea7a22b commit b2ec4cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
8 changes: 0 additions & 8 deletions rust/src/debuginfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 2 additions & 6 deletions rust/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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), &())
}
Expand Down

0 comments on commit b2ec4cc

Please sign in to comment.