Skip to content

Commit e36f793

Browse files
committed
build: add compile_error! if no runtime is set
Rust will still throw compiler errors for all the usages of tokio, but this at least adds some context to the failures, in plain English.
1 parent d3b6bc9 commit e36f793

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ pub use reader::{Line, MuxedLines};
4242

4343
#[cfg(doctest)]
4444
doc_comment::doctest!("../README.md");
45+
46+
#[cfg(not(any(feature = "tokio")))]
47+
compile_error!("At least one runtime feature must be enabled from: [\"tokio\"]");

0 commit comments

Comments
 (0)