Skip to content

Commit b2ec4cc

Browse files
rbranElykDeer
authored andcommitted
use the new public/private Array trait impl
1 parent ea7a22b commit b2ec4cc

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

rust/src/debuginfo.rs

-8
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,6 @@ unsafe impl CoreArrayProviderInner for DebugInfoParser {
285285
}
286286
}
287287

288-
unsafe impl CoreArrayWrapper for DebugInfoParser {
289-
type Wrapped<'a> = Guard<'a, DebugInfoParser>;
290-
291-
unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, _context: &'a Self::Context) -> Self::Wrapped<'a> {
292-
Guard::new(DebugInfoParser { handle: *raw }, &())
293-
}
294-
}
295-
296288
///////////////////////
297289
// DebugFunctionInfo
298290

rust/src/types.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -2094,17 +2094,13 @@ impl StructureMember {
20942094
impl CoreArrayProvider for StructureMember {
20952095
type Raw = BNStructureMember;
20962096
type Context = ();
2097+
type Wrapped<'a> = Guard<'a, StructureMember>;
20972098
}
20982099

2099-
unsafe impl CoreOwnedArrayProvider for StructureMember {
2100+
unsafe impl CoreArrayProviderInner for StructureMember {
21002101
unsafe fn free(raw: *mut Self::Raw, count: usize, _context: &Self::Context) {
21012102
BNFreeStructureMemberList(raw, count)
21022103
}
2103-
}
2104-
2105-
unsafe impl CoreArrayWrapper for StructureMember {
2106-
type Wrapped<'a> = Guard<'a, StructureMember>;
2107-
21082104
unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, _context: &'a Self::Context) -> Self::Wrapped<'a> {
21092105
Guard::new(StructureMember::from_raw(*raw), &())
21102106
}

0 commit comments

Comments
 (0)