From ea7a22b16fc56c23af397dd690c6c839dfb3a8f1 Mon Sep 17 00:00:00 2001 From: Rubens Brandao Date: Fri, 3 May 2024 13:28:53 -0300 Subject: hide array implementation details --- rust/src/linearview.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'rust/src/linearview.rs') diff --git a/rust/src/linearview.rs b/rust/src/linearview.rs index 31b05ad2..84b4323e 100644 --- a/rust/src/linearview.rs +++ b/rust/src/linearview.rs @@ -415,17 +415,13 @@ impl std::fmt::Display for LinearDisassemblyLine { impl CoreArrayProvider for LinearDisassemblyLine { type Raw = BNLinearDisassemblyLine; type Context = (); + type Wrapped<'a> = Guard<'a, LinearDisassemblyLine>; } -unsafe impl CoreOwnedArrayProvider for LinearDisassemblyLine { +unsafe impl CoreArrayProviderInner for LinearDisassemblyLine { unsafe fn free(raw: *mut BNLinearDisassemblyLine, count: usize, _context: &()) { BNFreeLinearDisassemblyLines(raw, count); } -} - -unsafe impl CoreArrayWrapper for LinearDisassemblyLine { - type Wrapped<'a> = Guard<'a, LinearDisassemblyLine>; - unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, _context: &'a Self::Context) -> Self::Wrapped<'a> { Guard::new(LinearDisassemblyLine::from_raw(raw), _context) } -- cgit v1.3.1