@@ -198,13 +198,13 @@ mod waitset {
198
198
let mut receiver_2_triggered = false ;
199
199
200
200
sut. run_once ( |attachment_id| {
201
- if attachment_id. event_from ( & listener_1_guard) {
201
+ if attachment_id. has_event_from ( & listener_1_guard) {
202
202
listener_1_triggered = true ;
203
- } else if attachment_id. event_from ( & listener_2_guard) {
203
+ } else if attachment_id. has_event_from ( & listener_2_guard) {
204
204
listener_2_triggered = true ;
205
- } else if attachment_id. event_from ( & receiver_1_guard) {
205
+ } else if attachment_id. has_event_from ( & receiver_1_guard) {
206
206
receiver_1_triggered = true ;
207
- } else if attachment_id. event_from ( & receiver_2_guard) {
207
+ } else if attachment_id. has_event_from ( & receiver_2_guard) {
208
208
receiver_2_triggered = true ;
209
209
} else {
210
210
test_fail ! ( "only attachments shall trigger" ) ;
@@ -233,8 +233,8 @@ mod waitset {
233
233
let start = Instant :: now ( ) ;
234
234
sut. run_once ( |id| {
235
235
callback_called = true ;
236
- assert_that ! ( id. event_from ( & tick_guard) , eq true ) ;
237
- assert_that ! ( id. deadline_from ( & tick_guard) , eq false ) ;
236
+ assert_that ! ( id. has_event_from ( & tick_guard) , eq true ) ;
237
+ assert_that ! ( id. has_missed_deadline ( & tick_guard) , eq false ) ;
238
238
} )
239
239
. unwrap ( ) ;
240
240
@@ -256,7 +256,7 @@ mod waitset {
256
256
257
257
let start = Instant :: now ( ) ;
258
258
sut. run_once ( |id| {
259
- assert_that ! ( id. deadline_from ( & guard) , eq true ) ;
259
+ assert_that ! ( id. has_missed_deadline ( & guard) , eq true ) ;
260
260
} )
261
261
. unwrap ( ) ;
262
262
@@ -296,13 +296,13 @@ mod waitset {
296
296
let mut receiver_2_triggered = false ;
297
297
298
298
sut. run_once ( |attachment_id| {
299
- if attachment_id. event_from ( & listener_1_guard) {
299
+ if attachment_id. has_event_from ( & listener_1_guard) {
300
300
listener_1_triggered = true ;
301
- } else if attachment_id. deadline_from ( & listener_2_guard) {
301
+ } else if attachment_id. has_missed_deadline ( & listener_2_guard) {
302
302
listener_2_triggered = true ;
303
- } else if attachment_id. event_from ( & receiver_1_guard) {
303
+ } else if attachment_id. has_event_from ( & receiver_1_guard) {
304
304
receiver_1_triggered = true ;
305
- } else if attachment_id. deadline_from ( & receiver_2_guard) {
305
+ } else if attachment_id. has_missed_deadline ( & receiver_2_guard) {
306
306
receiver_2_triggered = true ;
307
307
} else {
308
308
test_fail ! ( "only attachments shall trigger" ) ;
@@ -336,13 +336,13 @@ mod waitset {
336
336
let mut tick_4_triggered = false ;
337
337
338
338
sut. run_once ( |attachment_id| {
339
- if attachment_id. event_from ( & tick_1_guard) {
339
+ if attachment_id. has_event_from ( & tick_1_guard) {
340
340
tick_1_triggered = true ;
341
- } else if attachment_id. event_from ( & tick_2_guard) {
341
+ } else if attachment_id. has_event_from ( & tick_2_guard) {
342
342
tick_2_triggered = true ;
343
- } else if attachment_id. event_from ( & tick_3_guard) {
343
+ } else if attachment_id. has_event_from ( & tick_3_guard) {
344
344
tick_3_triggered = true ;
345
- } else if attachment_id. event_from ( & tick_4_guard) {
345
+ } else if attachment_id. has_event_from ( & tick_4_guard) {
346
346
tick_4_triggered = true ;
347
347
} else {
348
348
test_fail ! ( "only attachments shall trigger" ) ;
@@ -393,21 +393,21 @@ mod waitset {
393
393
let mut deadline_2_missed = false ;
394
394
395
395
sut. run_once ( |attachment_id| {
396
- if attachment_id. event_from ( & tick_1_guard) {
396
+ if attachment_id. has_event_from ( & tick_1_guard) {
397
397
tick_1_triggered = true ;
398
- } else if attachment_id. event_from ( & tick_2_guard) {
398
+ } else if attachment_id. has_event_from ( & tick_2_guard) {
399
399
tick_2_triggered = true ;
400
- } else if attachment_id. event_from ( & notification_1_guard) {
400
+ } else if attachment_id. has_event_from ( & notification_1_guard) {
401
401
notification_1_triggered = true ;
402
- } else if attachment_id. event_from ( & notification_2_guard) {
402
+ } else if attachment_id. has_event_from ( & notification_2_guard) {
403
403
notification_2_triggered = true ;
404
- } else if attachment_id. event_from ( & deadline_1_guard) {
404
+ } else if attachment_id. has_event_from ( & deadline_1_guard) {
405
405
deadline_1_triggered = true ;
406
- } else if attachment_id. event_from ( & deadline_2_guard) {
406
+ } else if attachment_id. has_event_from ( & deadline_2_guard) {
407
407
deadline_2_triggered = true ;
408
- } else if attachment_id. deadline_from ( & deadline_1_guard) {
408
+ } else if attachment_id. has_missed_deadline ( & deadline_1_guard) {
409
409
deadline_1_missed = true ;
410
- } else if attachment_id. deadline_from ( & deadline_2_guard) {
410
+ } else if attachment_id. has_missed_deadline ( & deadline_2_guard) {
411
411
deadline_2_missed = true ;
412
412
} else {
413
413
test_fail ! ( "only attachments shall trigger" ) ;
@@ -445,9 +445,9 @@ mod waitset {
445
445
let mut received_event = false ;
446
446
447
447
sut. run_once ( |attachment_id| {
448
- if attachment_id. event_from ( & deadline_1_guard) {
448
+ if attachment_id. has_event_from ( & deadline_1_guard) {
449
449
received_event = true ;
450
- } else if attachment_id. deadline_from ( & deadline_1_guard) {
450
+ } else if attachment_id. has_missed_deadline ( & deadline_1_guard) {
451
451
missed_deadline = true ;
452
452
} else {
453
453
test_fail ! ( "only attachments shall trigger" ) ;
0 commit comments