Skip to content

Commit

Permalink
build: add compile_error! if no runtime is set
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jmagnuson committed Nov 10, 2023
1 parent d3b6bc9 commit e36f793
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ pub use reader::{Line, MuxedLines};

#[cfg(doctest)]
doc_comment::doctest!("../README.md");

#[cfg(not(any(feature = "tokio")))]
compile_error!("At least one runtime feature must be enabled from: [\"tokio\"]");

0 comments on commit e36f793

Please sign in to comment.