Skip to content

Commit a3cb5fc

Browse files
committed
fix doctest when tokio is disbaled
1 parent fd6e2d8 commit a3cb5fc

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
@@ -13,6 +13,8 @@
1313
//! ## Example
1414
//!
1515
//! ```rust
16+
//! # #[cfg(feature="tokio")]
17+
//! # {
1618
//! use async_rs::{Runtime, TokioRuntime, traits::*};
1719
//! use std::{io, time::Duration};
1820
//!
@@ -36,6 +38,7 @@
3638
//! let rt = Runtime::tokio()?;
3739
//! rt.block_on(tokio_main(&rt))
3840
//! }
41+
//! # }
3942
//! ```
4043
4144
mod runtime;

0 commit comments

Comments
 (0)