diff options
author | Satya Rohith <me@satyarohith.com> | 2024-06-14 17:10:57 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-14 17:10:57 +0530 |
commit | 0f48313565ed2620efbd9d0f2203b57f8f126e6a (patch) | |
tree | 39e348917188b7524eadc138dfcf80f92a185ac6 /ext/ffi | |
parent | e19ee6eecc416a99801231ac53f2c512ba1f81dd (diff) |
chore: upgrade to rust 1.79 (#24207)
Diffstat (limited to 'ext/ffi')
-rw-r--r-- | ext/ffi/ir.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/ffi/ir.rs b/ext/ffi/ir.rs index 520ead92e..ebf64945b 100644 --- a/ext/ffi/ir.rs +++ b/ext/ffi/ir.rs @@ -8,7 +8,7 @@ use libffi::middle::Arg; use std::ffi::c_void; use std::ptr; -pub struct OutBuffer(pub *mut u8, pub usize); +pub struct OutBuffer(pub *mut u8); // SAFETY: OutBuffer is allocated by us in 00_ffi.js and is guaranteed to be // only used for the purpose of writing return value of structs. @@ -23,9 +23,8 @@ pub fn out_buffer_as_ptr( match out_buffer { Some(out_buffer) => { let ab = out_buffer.buffer(scope).unwrap(); - let len = ab.byte_length(); ab.data() - .map(|non_null| OutBuffer(non_null.as_ptr() as *mut u8, len)) + .map(|non_null| OutBuffer(non_null.as_ptr() as *mut u8)) } None => None, } |