You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently I've discovered scopeguard crate. It allows to do RAII-style cleanup of resources similarly to what DroppableValue structure does, but also provides a nice defer! macro to do it in a slightly less verbose way, similar to defer keyword in Go.
@theduke what do you think about replacing DroppableValue to usage of defer! macro from scopeguard crate?
The text was updated successfully, but these errors were encountered:
I actually wanted to wrap all types coming out of quickjs immediately with custom types. I didn't do it yet because I wrote them requiring a reference to bindings::Context and it would have needed some refactoring to instead just hold a raw reference to _sys::Context in order to be constructable from within callbacks.
Recently I've discovered
scopeguard
crate. It allows to do RAII-style cleanup of resources similarly to whatDroppableValue
structure does, but also provides a nicedefer!
macro to do it in a slightly less verbose way, similar todefer
keyword in Go.@theduke what do you think about replacing
DroppableValue
to usage ofdefer!
macro fromscopeguard
crate?The text was updated successfully, but these errors were encountered: