mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
4b7a3403bc
First, make sure that `add_methods` cannot trigger another userdata registry insert, causing an unintended panic. Second, remove `RefCell` surrounding userdata hashmap, as this change makes it no longer needed. Third, add a `RefCell` around `Callback` because FnMut means that callbacks cannot recurse into themselves, and panic appropriately when this happens. This should eventually be turned into an error.