()
| 115 | |
| 116 | #[test] |
| 117 | fn iter_mut_break() { |
| 118 | let mut report = build(); |
| 119 | |
| 120 | let mut chars = Vec::new(); |
| 121 | let flow = report.frames_mut(|frame| { |
| 122 | if let Some(ch) = frame.downcast_ref::<Char>() { |
| 123 | chars.push(ch.0); |
| 124 | if ch.0 == 'D' { |
| 125 | return ControlFlow::Break(()); |
| 126 | } |
| 127 | } |
| 128 | ControlFlow::Continue(()) |
| 129 | }); |
| 130 | assert!(flow.is_break()); |
| 131 | assert_eq!(chars, ['A', 'B', 'C', 'D']); |
| 132 | } |
nothing calls this directly
no test coverage detected