mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
fix bug in expect handling on the cli side
This commit is contained in:
parent
d3cb0e03d4
commit
6d0e751999
3 changed files with 64 additions and 22 deletions
|
@ -81,7 +81,6 @@ struct ExpectMemory {
|
|||
macro_rules! deref_number {
|
||||
($name: ident, $t: ty) => {
|
||||
fn $name(&self, addr: usize) -> $t {
|
||||
// dbg!(std::any::type_name::<$t>(), self.start, addr);
|
||||
let ptr = unsafe { self.start.add(addr) } as *const _;
|
||||
*self.bytes_read.borrow_mut() += std::mem::size_of::<$t>();
|
||||
unsafe { std::ptr::read_unaligned(ptr) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue