diff options
| author | Rubens Brandao <git@rubens.io> | 2024-05-03 13:28:53 -0300 |
|---|---|---|
| committer | Kyle Martin <krm504@nyu.edu> | 2024-05-10 12:00:27 -0400 |
| commit | ea7a22b16fc56c23af397dd690c6c839dfb3a8f1 (patch) | |
| tree | 45f3ba19172017694388ab6f7266e23df76bb670 /rust/src/segment.rs | |
| parent | 015314d34d073a8ebbd958edf8150a81381f12c2 (diff) | |
hide array implementation details
Diffstat (limited to 'rust/src/segment.rs')
| -rw-r--r-- | rust/src/segment.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/rust/src/segment.rs b/rust/src/segment.rs index 6ba2fbad..4c06a7ba 100644 --- a/rust/src/segment.rs +++ b/rust/src/segment.rs @@ -204,17 +204,13 @@ unsafe impl RefCountable for Segment { impl CoreArrayProvider for Segment { type Raw = *mut BNSegment; type Context = (); + type Wrapped<'a> = Guard<'a, Segment>; } -unsafe impl CoreOwnedArrayProvider for Segment { +unsafe impl CoreArrayProviderInner for Segment { unsafe fn free(raw: *mut Self::Raw, count: usize, _context: &Self::Context) { BNFreeSegmentList(raw, count); } -} - -unsafe impl CoreArrayWrapper for Segment { - type Wrapped<'a> = Guard<'a, Segment>; - unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, context: &'a Self::Context) -> Self::Wrapped<'a> { Guard::new(Segment::from_raw(*raw), context) } |
