🐛 Corrige orden de despacho en ActionsList
Las acciones con menor peso deben despacharse primero; `.rev()` lo invertía. Eliminado de `for_each` y `try_for_each`.
This commit is contained in:
parent
aa8b109668
commit
9acd8cc51a
1 changed files with 2 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ impl ActionsList {
|
|||
F: FnMut(&A),
|
||||
{
|
||||
let list = self.0.read();
|
||||
for a in list.iter().rev() {
|
||||
for a in list.iter() {
|
||||
if let Some(action) = (**a).downcast_ref::<A>() {
|
||||
f(action);
|
||||
} else {
|
||||
|
|
@ -40,7 +40,7 @@ impl ActionsList {
|
|||
F: FnMut(&A) -> std::ops::ControlFlow<()>,
|
||||
{
|
||||
let list = self.0.read();
|
||||
for a in list.iter().rev() {
|
||||
for a in list.iter() {
|
||||
if let Some(action) = (**a).downcast_ref::<A>() {
|
||||
if f(action).is_break() {
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue