2018-10-27 19:56:02 +02:00
|
|
|
#[macro_use]
|
|
|
|
extern crate eventbus;
|
|
|
|
|
|
|
|
use eventbus::{Event, EventBus};
|
|
|
|
|
|
|
|
struct MyEvent {
|
|
|
|
i: i32
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Event for MyEvent {
|
|
|
|
}
|
|
|
|
|
|
|
|
fn test_hygiene() {
|
|
|
|
let bus = [EventBus::new()];
|
|
|
|
let mut event = MyEvent { i: 3 };
|
2018-12-03 14:03:54 +01:00
|
|
|
post_event!(&bus[CANCELLABLE.load(::std::sync::atomic::Ordering::Relaxed)], &mut event, MyEvent); //~ ERROR cannot find value `CANCELLABLE` in this scope
|
2018-10-27 19:56:02 +02:00
|
|
|
}
|