File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ impl Flow {
73
73
/// # }
74
74
/// ```
75
75
pub fn is_break ( & self ) -> bool {
76
- matches ! ( self . action, Action :: Continue )
76
+ matches ! ( self . action, Action :: Break )
77
77
}
78
78
79
79
/// Checks if the current action is [`Action::Continue`].
Original file line number Diff line number Diff line change @@ -121,9 +121,9 @@ impl Router {
121
121
) -> Result < bool > {
122
122
let mut middlewares = middlewares. extend ( self . middlewares . clone ( ) ) ;
123
123
124
- for handler in self . handlers . iter_mut ( ) {
125
- let mut middleware_flow = middlewares . handle_before ( client , update , injector ) . await ;
126
- if middleware_flow . is_continue ( ) {
124
+ let mut middleware_flow = middlewares . handle_before ( client , update , injector ) . await ;
125
+ if middleware_flow. is_continue ( ) {
126
+ for handler in self . handlers . iter_mut ( ) {
127
127
let mut flow = handler. check ( client, update) . await ;
128
128
flow. injector . extend ( & mut middleware_flow. injector ) ;
129
129
You can’t perform that action at this time.
0 commit comments