fix events::adding_and_removing_listeners test failure in release mode
best guess is that release mode optimizations collapsed these two functions into one, because in release mode the assertion that would fail was: assert!(listeners.add(other_dummy_listener)); which would mean that `listeners.add()` thought it was trying to add a duplicate listener function. adding dummy println's is a simple way to ensure that the compiler won't try to collapse these thinking that they are the same function.
This commit is contained in:
parent
d9e26556e6
commit
040e480dd0
|
@ -175,10 +175,12 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn dummy_listener(_event: &TestEvent, _context: &mut DummyContext) -> bool {
|
fn dummy_listener(_event: &TestEvent, _context: &mut DummyContext) -> bool {
|
||||||
|
println!("dummy_listener event fired");
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
fn other_dummy_listener(_event: &TestEvent, _context: &mut DummyContext) -> bool {
|
fn other_dummy_listener(_event: &TestEvent, _context: &mut DummyContext) -> bool {
|
||||||
|
println!("other_dummy_listener event fired");
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue