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
But for move-only types I wouldn't know a better solution.
We could try to add a "conditional pop" function to the API?
Something where you can pass a closure which can decide if the element should be popped or not?
But still we could only pass a reference to the closure, we would still not get ownership.
Or there could be two closures, one for checking and one for getting ownership on success? But this seems a bit convoluted, doesn't it?
I have code like this in two places in my application now:
The
while let
immediately followed byif let
feels verbose and hacky... is there a better way to do this?The text was updated successfully, but these errors were encountered: