mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
remove callresult from cli examples
This commit is contained in:
parent
9d53e1d748
commit
c5eeaab2c2
10 changed files with 60 additions and 112 deletions
|
@ -70,23 +70,11 @@ pub fn rust_main() -> isize {
|
|||
|
||||
roc_main(buffer);
|
||||
|
||||
let output = buffer as *mut RocCallResult<()>;
|
||||
let result = call_the_closure(buffer);
|
||||
|
||||
match (&*output).into() {
|
||||
Ok(()) => {
|
||||
let closure_data_ptr = buffer.offset(8);
|
||||
let result = call_the_closure(closure_data_ptr as *const u8);
|
||||
std::alloc::dealloc(buffer, layout);
|
||||
|
||||
std::alloc::dealloc(buffer, layout);
|
||||
|
||||
result
|
||||
}
|
||||
Err(msg) => {
|
||||
std::alloc::dealloc(buffer, layout);
|
||||
|
||||
panic!("Roc failed with message: {}", msg);
|
||||
}
|
||||
}
|
||||
result
|
||||
};
|
||||
|
||||
// Exit code
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue