Open bigdogs opened 3 years ago
Sorry, I don't understand, can you provide an example or something like that, please? :)
@bigdogs the struct in the sample code is a unit struct. You could have fields in there too. In the worst case, you can just store a Boxed closure and execute it in the drop impl.
The sample code in idioms dtor-finally cannot capture outside variable, which means it's useless in most cases