rust-imap icon indicating copy to clipboard operation
rust-imap copied to clipboard

Use ControlFlow for IDLE callback return type

Open mordak opened this issue 3 years ago • 2 comments

The the ControlFlow type might be nicer than the bool type as a return for the IDLE callbacks. If / when the type is stabilized have a look at implementing it there.

Originally posted by @jonhoo in https://github.com/jonhoo/rust-imap/issues/186#issuecomment-820092526

mordak avatar Apr 21 '21 01:04 mordak

It's available on nightly if anyone wants to try an experiment to see what it would look like: https://doc.rust-lang.org/nightly/std/ops/enum.ControlFlow.html

(I agree with waiting for it to stabilize before merging such a change, though.)

EDIT: And I have a PR up to stabilize it, though libs has yet to weigh in.

scottmcm avatar Apr 25 '21 19:04 scottmcm

It just missed 1.54, but ControlFlow is now stabilized for 1.55.

scottmcm avatar Jun 14 '21 22:06 scottmcm