Skip to content

Commit 7edecd3

Browse files
author
Xinye
committed
fix default build
Signed-off-by: Xinye <[email protected]>
1 parent ea06e6c commit 7edecd3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,7 @@ impl FailPoint {
612612

613613
fn set_actions(&self, actions_str: &str, actions: Vec<Action>) {
614614
loop {
615+
#[cfg(feature = "async")]
615616
self.async_pause_notify.notify_waiters();
616617
// TODO: maybe busy waiting here.
617618
match self.actions.try_write() {
@@ -674,7 +675,10 @@ impl FailPoint {
674675
Task::Callback(f) => {
675676
f.run();
676677
}
677-
Task::CallbackAsync(_) => unreachable!(),
678+
#[cfg(feature = "async")]
679+
Task::CallbackAsync(_) => panic!(
680+
"to use async callback, please enable `async` feature and use `async_fail_point`"
681+
),
678682
}
679683
None
680684
}

0 commit comments

Comments
 (0)