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/platform.rs | |
| parent | 015314d34d073a8ebbd958edf8150a81381f12c2 (diff) | |
hide array implementation details
Diffstat (limited to 'rust/src/platform.rs')
| -rw-r--r-- | rust/src/platform.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/rust/src/platform.rs b/rust/src/platform.rs index 42e2f80c..11f76284 100644 --- a/rust/src/platform.rs +++ b/rust/src/platform.rs @@ -365,17 +365,13 @@ unsafe impl RefCountable for Platform { impl CoreArrayProvider for Platform { type Raw = *mut BNPlatform; type Context = (); + type Wrapped<'a> = Guard<'a, Platform>; } -unsafe impl CoreOwnedArrayProvider for Platform { +unsafe impl CoreArrayProviderInner for Platform { unsafe fn free(raw: *mut *mut BNPlatform, count: usize, _context: &()) { BNFreePlatformList(raw, count); } -} - -unsafe impl CoreArrayWrapper for Platform { - type Wrapped<'a> = Guard<'a, Platform>; - unsafe fn wrap_raw<'a>(raw: &'a *mut BNPlatform, context: &'a ()) -> Self::Wrapped<'a> { debug_assert!(!raw.is_null()); Guard::new(Platform { handle: *raw }, context) |
