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
Before the latest changes at #10830 I could write if port.peek() { match port.try_recv() { ..., now I cannot write equivalent code. One possible solution would be to have a method (let's call it try_opt) that returns an enumeration consisting of either a result or an indication of an empty port or a an indication of a closed port. This solution feels kind of ugly to me though so I'd appreciate suggestions on better solutions.