Use newly-stabilised `std::ops::ControlFlow`
Closed this issue · 1 comments
lunacookies commented
Rust 1.55 stabilised std::ops::ControlFlow
, which we defined manually. We should switch to using the definition from the standard library.
lunacookies commented
Our version of ControlFlow
has three variants, of which none can be removed. Thus, the only way to start using std
’s version is to add a contained boolean to either ControlFlow::Break
or ControlFlow::Continue
that represents the third variant. This adds complexity and makes the code harder to understand for the only benefit of avoiding one type definition, so I’d argue it’s better to leave the code as it is.