File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ use crate::{convert, ops};
7
7
/// Having the enum makes it clearer -- no more wondering "wait, what did `false`
8
8
/// mean again?" -- and allows including a value.
9
9
///
10
+ /// Similar to [`Option`] and [`Result`], this enum can be used with the `?` operator
11
+ /// to return immediatly if the [`Break`] variant is present or to continue normally
12
+ /// with the value inside the [`Continue`] variant.
13
+ ///
10
14
/// # Examples
11
15
///
12
16
/// Early-exiting from [`Iterator::try_for_each`]:
@@ -46,6 +50,9 @@ use crate::{convert, ops};
46
50
/// }
47
51
/// }
48
52
/// ```
53
+ ///
54
+ /// [`Break`]: ControlFlow::Break
55
+ /// [`Continue`]: ControlFlow::Continue
49
56
#[ stable( feature = "control_flow_enum_type" , since = "1.55.0" ) ]
50
57
#[ derive( Debug , Clone , Copy , PartialEq ) ]
51
58
pub enum ControlFlow < B , C = ( ) > {
You can’t perform that action at this time.
0 commit comments