Use ops::ControlFlow in graph::iterate

This commit is contained in:
Scott McMurray
2020-09-04 00:59:41 -07:00
parent 0d0f6b1130
commit fac272688e
7 changed files with 19 additions and 13 deletions

View File

@@ -65,3 +65,10 @@ impl<R: Try> ControlFlow<R::Ok, R> {
}
}
}
impl<B> ControlFlow<(), B> {
/// It's frequently the case that there's no value needed with `Continue`,
/// so this provides a way to avoid typing `(())`, if you prefer it.
#[unstable(feature = "control_flow_enum", reason = "new API", issue = "75744")]
pub const CONTINUE: Self = ControlFlow::Continue(());
}