-
-
Interesting! Thanks. I'm not too familiar with Drop just yet, but it sounds like it's more of a C++ destructor kind of thing right? My goal is really to be able to make sure that certain things (involving system calls) happen when leaving a given function.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Like making sure a fd or a socket is closed, or a temporary file is deleted.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Welcome back from the land of GC?
-
New conversation -
-
-
AFAICT: Drop is for operations that "cannot fail", right? Guessing that covers most usecases of defer though.
-
It’s true that it doesn’t provide a way to signal an error, but then again, neither does defer, right? If you want to handle an error, the idiom is to provide a method that takes ownership and returns a Result
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.