Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Conversation

@romazu
Copy link

@romazu romazu commented Jan 14, 2025

Use slab.ps.char_buf: UnsafeCell<String> to avoid invalid_reference_casting errors in lines like this:

EVar(name) => eval_var!(ns, name, Vec::new(), unsafe{ &mut *(&slab.ps.char_buf as *const _ as *mut _) }),
                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

It is a zero-cost abstraction, so there is no additional overhead or performance hit.

…_reference_casting)

It is a zero-cost abstraction, so there is no additional overhead or performance hit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant