rust-imap
rust-imap copied to clipboard
Use ControlFlow for IDLE callback return type
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
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.
It just missed 1.54, but ControlFlow
is now stabilized for 1.55.