From 2845ba6208ce3c29998a48df5073ed15a11ead77 Mon Sep 17 00:00:00 2001 From: KyleMiles Date: Mon, 14 Feb 2022 18:41:40 -0500 Subject: Rust: Minor tweaks to 2890; merge architecture::InstructionTextToken and disassembly::InstructionTextToken; update examples --- rust/src/rc.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'rust/src/rc.rs') diff --git a/rust/src/rc.rs b/rust/src/rc.rs index bc60bf94..a55c46d2 100644 --- a/rust/src/rc.rs +++ b/rust/src/rc.rs @@ -197,6 +197,11 @@ impl Array

{ pub fn len(&self) -> usize { self.count } + + pub fn into_raw_parts(self) -> (*mut P::Raw, usize) { + let me = mem::ManuallyDrop::new(self); + (me.contents, me.count) + } } impl<'a, P: 'a + CoreArrayWrapper<'a> + CoreOwnedArrayProvider> Array

{ -- cgit v1.3.1